export default function curves()

in packages/processing-vsvg/src/path/curves.ts [107:128]


export default function curves(
	type: string,
	orientation?: Orientation | undefined,
	tension?: number | undefined,
): CurveFactory {
	const entry =
		Object.prototype.hasOwnProperty.call(lookup, type) && lookup[type]
	// let curve: CurveFactory | CurveBundleFactory

	if (entry) {
		const curveFactory = entry.curve || entry[orientation || 'vertical']
		if (entry.tension && tension != null) {
			return curveFactory[entry.tension](tension)
		} else {
			return curveFactory
		}
	} else {
		throw new Error(
			`could not retrieve curveFactory type ${type}, orientation ${orientation}`,
		)
	}
}