dep: switch to @iarna/toml over toml

This commit is contained in:
Sebastian Rollen
2022-10-29 16:48:57 -04:00
parent d016e4d81c
commit 43601061a5
48 changed files with 2866 additions and 5361 deletions

18
node_modules/@iarna/toml/parse-string.js generated vendored Executable file
View File

@@ -0,0 +1,18 @@
'use strict'
module.exports = parseString
const TOMLParser = require('./lib/toml-parser.js')
const prettyError = require('./parse-pretty-error.js')
function parseString (str) {
if (global.Buffer && global.Buffer.isBuffer(str)) {
str = str.toString('utf8')
}
const parser = new TOMLParser()
try {
parser.parse(str)
return parser.finish()
} catch (err) {
throw prettyError(err, str)
}
}