planning
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s

This commit is contained in:
2024-10-14 09:15:30 +02:00
parent bcba00a730
commit 6e64e138e2
21059 changed files with 2317811 additions and 1 deletions

30
node_modules/@iarna/toml/parse-async.js generated vendored Executable file
View File

@@ -0,0 +1,30 @@
'use strict'
module.exports = parseAsync
const TOMLParser = require('./lib/toml-parser.js')
const prettyError = require('./parse-pretty-error.js')
function parseAsync (str, opts) {
if (!opts) opts = {}
const index = 0
const blocksize = opts.blocksize || 40960
const parser = new TOMLParser()
return new Promise((resolve, reject) => {
setImmediate(parseAsyncNext, index, blocksize, resolve, reject)
})
function parseAsyncNext (index, blocksize, resolve, reject) {
if (index >= str.length) {
try {
return resolve(parser.finish())
} catch (err) {
return reject(prettyError(err, str))
}
}
try {
parser.parse(str.slice(index, index + blocksize))
setImmediate(parseAsyncNext, index + blocksize, blocksize, resolve, reject)
} catch (err) {
reject(prettyError(err, str))
}
}
}