stringify-symbol.js 302 B

12345678910111213141516
  1. const stringify = require('./stringify');
  2. /**
  3. * @param {SpriteSymbol} symbol
  4. * @return {string}
  5. */
  6. function stringifySymbol(symbol) {
  7. return stringify({
  8. id: symbol.id,
  9. use: symbol.useId,
  10. viewBox: symbol.viewBox,
  11. content: symbol.render()
  12. });
  13. }
  14. module.exports = stringifySymbol;