1<!DOCTYPE html> 2<html lang="en"> 3<head> 4 <meta charset="utf-8"> 5 <meta name="viewport" content="width=device-width"> 6 <meta name="nodejs.org:node-version" content="__VERSION__"> 7 <title>__SECTION__ | Node.js __VERSION__ Documentation</title> 8 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic&display=fallback"> 9 <link rel="stylesheet" href="assets/style.css"> 10 <link rel="stylesheet" href="assets/hljs.css"> 11 <link rel="canonical" href="https://nodejs.org/api/__FILENAME__.html"> 12</head> 13<body class="alt apidoc" id="api-section-__FILENAME__"> 14 <div id="content" class="clearfix"> 15 <div id="column2" class="interior"> 16 <div id="intro" class="interior"> 17 <a href="/" title="Go back to the home page"> 18 Node.js 19 </a> 20 </div> 21 __GTOC__ 22 </div> 23 24 <div id="column1" data-id="__ID__" class="interior"> 25 <header> 26 <div class="header-container"> 27 <h1>Node.js __VERSION__ documentation</h1> 28 <button class="theme-toggle-btn" id="theme-toggle-btn" title="Toggle dark mode/light mode" aria-label="Toggle dark mode/light mode" hidden> 29 <svg xmlns="http://www.w3.org/2000/svg" class="icon dark-icon" height="24" width="24"> 30 <path fill="none" d="M0 0h24v24H0z" /> 31 <path d="M11.1 12.08c-2.33-4.51-.5-8.48.53-10.07C6.27 2.2 1.98 6.59 1.98 12c0 .14.02.28.02.42.62-.27 1.29-.42 2-.42 1.66 0 3.18.83 4.1 2.15A4.01 4.01 0 0111 18c0 1.52-.87 2.83-2.12 3.51.98.32 2.03.5 3.11.5 3.5 0 6.58-1.8 8.37-4.52-2.36.23-6.98-.97-9.26-5.41z"/> 32 <path d="M7 16h-.18C6.4 14.84 5.3 14 4 14c-1.66 0-3 1.34-3 3s1.34 3 3 3h3c1.1 0 2-.9 2-2s-.9-2-2-2z"/> 33 </svg> 34 <svg xmlns="http://www.w3.org/2000/svg" class="icon light-icon" height="24" width="24"> 35 <path d="M0 0h24v24H0z" fill="none" /> 36 <path d="M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z"/> 37 </svg> 38 </button> 39 </div> 40 <div id="gtoc"> 41 <ul> 42 <li> 43 <a href="index.html">Index</a> 44 </li> 45 <li> 46 <a href="all.html">View on single page</a> 47 </li> 48 <li> 49 <a href="__FILENAME__.json">View as JSON</a> 50 </li> 51 __ALTDOCS__ 52 __EDIT_ON_GITHUB__ 53 </ul> 54 </div> 55 <hr> 56 </header> 57 58 __TOC__ 59 60 <div id="apicontent"> 61 __CONTENT__ 62 <!-- API END --> 63 </div> 64 </div> 65 </div> 66 <script> 67 'use strict'; 68 { 69 const kCustomPreference = 'customDarkTheme'; 70 const userSettings = sessionStorage.getItem(kCustomPreference); 71 const themeToggleButton = document.getElementById('theme-toggle-btn'); 72 if (userSettings === null && window.matchMedia) { 73 const mq = window.matchMedia('(prefers-color-scheme: dark)'); 74 if ('onchange' in mq) { 75 function mqChangeListener(e) { 76 document.body.classList.toggle('dark-mode', e.matches); 77 } 78 mq.addEventListener('change', mqChangeListener); 79 if (themeToggleButton) { 80 themeToggleButton.addEventListener('click', function() { 81 mq.removeEventListener('change', mqChangeListener); 82 }, { once: true }); 83 } 84 } 85 if (mq.matches) { 86 document.body.classList.add('dark-mode'); 87 } 88 } else if (userSettings === 'true') { 89 document.body.classList.add('dark-mode'); 90 } 91 if (themeToggleButton) { 92 themeToggleButton.hidden = false; 93 themeToggleButton.addEventListener('click', function() { 94 sessionStorage.setItem( 95 kCustomPreference, 96 document.body.classList.toggle('dark-mode') 97 ); 98 }); 99 } 100 } 101 </script> 102</body> 103</html> 104