/var/www/greso.tech/server/nsm/node_modules/extract-svg-path
NameSizeModeActions
.npmignore740644editdlrm
browser.js8360644editdlrm
index.js6700644editdlrm
LICENSE.md10830644editdlrm
package.json12670644editdlrm
README.md23030644editdlrm
transform.js5600644editdlrm
Edit: /var/www/greso.tech/server/nsm/node_modules/extract-svg-path/browser.js (836B)
var parseXml = require('xml-parse-from-string') function extractSvgPath (svgDoc) { // concat all the elements to form an SVG path string if (typeof svgDoc === 'string') { svgDoc = parseXml(svgDoc) } if (!svgDoc || typeof svgDoc.getElementsByTagName !== 'function') { throw new Error('could not get an XML document from the specified SVG contents') } var paths = Array.prototype.slice.call(svgDoc.getElementsByTagName('path')) return paths.reduce(function (prev, path) { var d = path.getAttribute('d') || '' return prev + ' ' + d.replace(/\s+/g, ' ').trim() }, '').trim() } module.exports = function () { throw new Error('use extract-svg-path/transform to inline SVG contents into your bundle') } module.exports.parse = extractSvgPath //deprecated module.exports.fromString = extractSvgPath