From 0b1d5f3d52557903479760cd11c0d09540e53c00 Mon Sep 17 00:00:00 2001 From: Shreshth Mohan Date: Wed, 6 Apr 2022 10:14:20 +0530 Subject: [PATCH] update readme with docs, add changes.md --- CHANGES.md | 6 ++++++ README.md | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 CHANGES.md 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)