Son CV dans un terminal web en Javascript!
https://terminal-cv.gregandev.fr
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
415 B
18 lines
415 B
'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)
|
|
}
|
|
}
|
|
|