trouble-in-terror-town/node_modules/@iarna/toml/parse-string.js
Mikolaj 2bbacbea09 did some more work on networking and removed EOS in favor of LRM
did some more work on networking and removed EOS in favor of Light Reflective Mirror
2022-05-31 15:04:31 +02:00

18 lines
415 B
JavaScript

'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)
}
}