How to use the svgicons2svgfont/src/metadata function in svgicons2svgfont

To help you get started, we’ve selected a few svgicons2svgfont examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github itgalaxy / webfont / src / standalone.js View on Github external
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

svgicons2svgfont

Read a set of SVG icons and output a SVG font

MIT
Latest version published 15 days ago

Package Health Score

92 / 100
Full package analysis