diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 0000000..07dd174 --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,6 @@ +# changelog + +## Changes in 1.0.0 + +- Breaking: The return value is now an **object** instead of a **string** +- Added meta information, errors, and warnings diff --git a/README.md b/README.md index fcfe674..c471887 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,15 @@ const pathStringC = roundedPolygonByCircumRadius({ // set this to the "d" attribute of a SVG element ``` +### return value + +The return value is an **object** with the following properties: + +- `d` (string) SVG path string to be used as a value to the `d` attributes of a `` element +- `meta` (object) contains helpful values: `sideLength`, `circumRadius`, `inRadius`, `minSideLength`, and `borderRadius` +- `warnings` (an array of strings) +- `errors` (an array of strings) + ## `roundedPolygonBySideLength(options)` `options` properties @@ -72,6 +81,15 @@ const pathStringS = roundedPolygonBySideLength({ // set this to the "d" attribute of a SVG element ``` +### return value + +The return value is an **object** with the following properties: + +- `d` (string) SVG path string to be used as a value to the `d` attributes of a `` element +- `meta` (object) contains helpful values: `sideLength`, `circumRadius`, `inRadius`, `minSideLength`, and `borderRadius` +- `warnings` (an array of strings) +- `errors` (an array of strings) + ## Demos - [Codepen (UMD)](https://codepen.io/shreshthmohan/pen/mdpqaPY)