snap = (...geometries) => {
  geometries = flatten(geometries)
  if (geometries.length === 0) throw new Error('wrong number of arguments')

  const results = geometries.map((geometry) => {
    if (path2.isA(geometry)) return snapPath2(geometry)
    if (geom2.isA(geometry)) return snapGeom2(geometry)
    if (geom3.isA(geometry)) return snapGeom3(geometry)
    return geometry
  })
  return results.length === 1 ? results[0] : results
}
Snap the given geometries to the precision (calculated epsilon) of the geometry.
@see measurements.measureEpsilon()
@param {...Object} geometries - the geometries to snap
@return {Object|Array} the snapped geometry, or a list of snapped geometries
@alias module:modeling/modifiers.snap