Skip to content

Commit

Permalink
update readme with docs, add changes.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shreshthmohan committed Apr 6, 2022
1 parent 035a666 commit 0b1d5f3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ const pathStringC = roundedPolygonByCircumRadius({
// set this to the "d" attribute of a <path> 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 `<path>` 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
Expand Down Expand Up @@ -72,6 +81,15 @@ const pathStringS = roundedPolygonBySideLength({
// set this to the "d" attribute of a <path> 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 `<path>` 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)
Expand Down

0 comments on commit 0b1d5f3

Please sign in to comment.