# normalize-svg-path

> Convert all segments in a path to curves

Latest version **1.1.0** (published 2020-09-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install normalize-svg-path
pnpm add normalize-svg-path
yarn add normalize-svg-path
bun add normalize-svg-path
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2020-09-18 |
| First published | 2013-12-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 13.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jake Rosoman |
| Maintainers | jkroso, dfcreative |
| Keywords | svg, path, normalize |

## Links

- npm: https://www.npmjs.com/package/normalize-svg-path
- Repository: https://github.com/jkroso/normalize-svg-path
- Homepage: https://github.com/jkroso/normalize-svg-path#readme
- Issues: https://github.com/jkroso/normalize-svg-path/issues
- npm.io page: https://npm.io/package/normalize-svg-path

## Dependencies (1)

- [svg-arc-to-cubic-bezier](https://npm.io/package/svg-arc-to-cubic-bezier.md) ^3.0.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.1.0 (latest) — 2020-09-18
- 1.0.1 — 2017-07-22
- 1.0.0 — 2017-07-22
- 0.1.0 — 2013-12-19

## README

# normalize-svg-path [![build](https://travis-ci.org/jkroso/normalize-svg-path.svg?branch=master)](https://travis-ci.org/jkroso/normalize-svg-path)


  Convert all segments in a path to curves. Usefull if you intend to animate one shape to another. By defining all segments with curves instead of a mix of lines, arcs, and curves tweening becomes much simpler. It could also help you rewrite your SVG code according to the principles of [narcissistic design](//vimeo.com/77199361).

## Usage

[![npm install normalize-svg-path](https://nodei.co/npm/normalize-svg-path.png?mini=true)](https://npmjs.org/package/normalize-svg-path/)

```js
import parse from 'parse-svg-path'
import abs from 'abs-svg-path'
import normalize from 'normalize-svg-path'

const segments = normalize(abs(parse('M0 0L10 10A10 10 0 0 0 20 20Z')))
```

## API

### normalize(path)

  Translate each segment in `path` to an equivalent cubic bézier curve. The input `path` must be [absolute](//github.com/jkroso/abs-svg-path).

```js
normalize([['L',1,2]]) // => [['C',0,0,1,2,1,2]]
```

---
_Source: https://npm.io/package/normalize-svg-path · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
