Open librarywebchic opened 5 years ago
I'm using it using async/await by wrapping it in a Promise like this
return new Promise((resolve, reject) => {
marc4js.parse(data, {
format: 'marcxml'
}, function (err, records) {
if(err) {return reject(err);}
return resolve(records);
});
});
Can this library be used via Async/Await?