Remove Node.js v8 support (#1402)
This commit is contained in:
committed by
GitHub
parent
7801b2cc13
commit
ab5d8997b8
@ -126,14 +126,14 @@ function generate () {
|
||||
}
|
||||
|
||||
function generateAsciidoc (source) {
|
||||
var asciidoc = '// This file is autogenerated, DO NOT EDIT\n'
|
||||
let asciidoc = '// This file is autogenerated, DO NOT EDIT\n'
|
||||
asciidoc += '// Use `node scripts/generate-docs-examples.js` to generate the docs examples\n\n'
|
||||
var code = 'async function run (client) {\n// START\n'
|
||||
let code = 'async function run (client) {\n// START\n'
|
||||
|
||||
for (var i = 0; i < source.length; i++) {
|
||||
for (let i = 0; i < source.length; i++) {
|
||||
const { api, query, params, body } = source[i]
|
||||
const apiArguments = Object.assign({}, params, query, body ? { body } : body)
|
||||
var serializedApiArguments = Object.keys(apiArguments).length > 0
|
||||
const serializedApiArguments = Object.keys(apiArguments).length > 0
|
||||
? JSON.stringify(apiArguments, null, 2)
|
||||
: ''
|
||||
code += `const response${getResponsePostfix(i)} = await client.${api.replace(/_([a-z])/g, g => g[1].toUpperCase())}(${serializedApiArguments})
|
||||
|
||||
Reference in New Issue
Block a user