deserialize = (options, input) => {
  const defaults = {
    addMetaData: true,
    filename: 'svg',
    output: 'script',
    pxPmm: require('./constants').pxPmm,
    segments: 32,
    target: 'path', // target - 'geom2' or 'path'
    pathSelfClosed: 'error',
    version
  }
  options = Object.assign({}, defaults, options)
  input = ensureString(input)
  return options.output === 'script' ? translate(input, options) : instantiate(input, options)
}
Deserialize the given SVG source into either a script or an array of geometries
@see {@link https://www.w3.org/TR/SVG/intro.html|SVG Specification}
@param {Object} options - options used during deserializing, REQUIRED
@param {boolean} [options.addMetadata=true] - toggle injection of metadata at the start of the script
@param {string} [options.filename='svg'] - filename of original SVG source
@param {string} [options.output='script'] - either 'script' or 'geometry' to set desired output
@param {float} [options.pxPmm] - custom pixels per mm unit
@param {integer} [options.segments] - number of segments for rounded shapes
@param {string} [options.target] - target 2D geometry; 'geom2' or 'path2'
@param {string} [options.version='0.0.0'] - version number to add to the metadata
@param {string} [options.pathSelfClosed='error'] - [error||trim||split] if path self-closes with one of commands without stop command right after
@param {string} input - SVG source data
@returns {(Array|String)} either an array of objects (geometry) or a string (script)
@alias module:io/svg-deserializer.deserialize