UNPKG

html-squircle

Version:

Utilities for generating superellipse squircles in the form of SVG strings, to be used in clip-path and background inline styles.

41 lines (40 loc) 991 B
(function (factory) { if (typeof module === "object" && typeof module.exports === "object") { var v = /*#__PURE__*/factory(require, exports); if (v !== undefined) module.exports = v; } else if (typeof define === "function" && define.amd) { define(["require", "exports"], factory); } })(function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fillOptions = void 0; /** * Returns a new object with all Background options, filled by the input, * ordered, and restricted only to Background options. */ const fillOptions = ({ width = 0, height = 0, curveLength = 0, roundness = 0, stroke = "", strokeWidth = 0, background = "", injectedDefs = "", injectedBody = "" }) => ({ width, height, curveLength, roundness, stroke, strokeWidth, background, injectedDefs, injectedBody }); exports.fillOptions = fillOptions; });