docs: update to the use of arrow functions in line with the style guide (#30194)

* docs: Update to the use of arrow functions in line with the style guide

* docs: Fixed unmatched bracket typo in previous commit 9ebe3e58f7948c6636d77f3c58a2693683b69691

* fix linting

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
This commit is contained in:
Matthew Shen 2021-08-01 21:57:37 -04:00 committed by GitHub
parent ced2e8779f
commit c0e72bd335
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 33 additions and 33 deletions

View file

@ -134,7 +134,7 @@ app.whenReady().then(async () => {
<script>
const { ipcRenderer } = require('electron')
function doWork(input) {
const doWork = (input) => {
// Something cpu-intensive.
return input * 2
}
@ -185,7 +185,7 @@ stream of data.
```js
// renderer.js ///////////////////////////////////////////////////////////////
function makeStreamingRequest (element, callback) {
const makeStreamingRequest = (element, callback) => {
// MessageChannels are lightweight--it's cheap to create a new one for each
// request.
const { port1, port2 } = new MessageChannel()