Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getGlyphsData(files, options) {
const metadataProvider =
options.metadataProvider ||
defaultMetadataProvider({
prependUnicode: options.prependUnicode,
startUnicode: options.startUnicode
});
const xmlParser = new xml2js.Parser();
const throttle = pLimit(options.maxConcurrency);
return Promise.all(
files.map(srcPath =>
throttle(
() =>
new Promise((resolve, reject) => {
const glyph = fs.createReadStream(srcPath);
let glyphContents = "";
return glyph