expand = (options, ...objects) => {
  objects = flatten(objects)
  if (objects.length === 0) throw new Error('wrong number of arguments')

  const results = objects.map((object) => {
    if (path2.isA(object)) return expandPath2(options, object)
    if (geom2.isA(object)) return expandGeom2(options, object)
    if (geom3.isA(object)) return expandGeom3(options, object)
    return object
  })
  return results.length === 1 ? results[0] : results
}
Expand the given geometry using the given options.
Both internal and external space is expanded for 2D and 3D shapes.

Note: Contract is expand using a negative delta.
@param {Object} options - options for expand
@param {Number} [options.delta=1] - delta (+/-) of expansion
@param {String} [options.corners='edge'] - type of corner to create after expanding; edge, chamfer, round
@param {Integer} [options.segments=16] - number of segments when creating round corners
@param {...Objects} objects - the geometries to expand
@return {Object|Array} new geometry, or list of new geometries
@alias module:modeling/expansions.expand

@example
let newarc = expand({delta: 5, corners: 'edge'}, arc({}))
let newsquare = expand({delta: 5, corners: 'chamfer'}, square({size: 30}))
let newcuboid = expand({delta: 2, corners: 'round'}, cuboid({size: [20, 25, 5]}))