import svg2img from 'svg2img' ; import { createRenderer } from './types' ; export default createRenderer ( { render : ( svg ) => new Promise ( ( resolve , reject ) => { svg2img ( svg , ( err , buf ) => { if ( err ) return reject ( err ) ; return resolve ( buf ) ; } ) ; } ) , } ) ;