# create-svg-size

> Create an svg object with a given x/y width/height

Latest version **1.1.0** (published 2016-02-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install create-svg-size
pnpm add create-svg-size
yarn add create-svg-size
bun add create-svg-size
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-02-16 |
| First published | 2015-09-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ben Drucker |
| Maintainers | bendrucker |
| Keywords | svg, size, view, box |

## Links

- npm: https://www.npmjs.com/package/create-svg-size
- Repository: https://github.com/bendrucker/create-svg-size
- Homepage: https://github.com/bendrucker/create-svg-size#readme
- Issues: https://github.com/bendrucker/create-svg-size/issues
- npm.io page: https://npm.io/package/create-svg-size

## Dependencies (1)

- [assert-ok](https://npm.io/package/assert-ok.md) ~1.0.0

## Alternatives

- [react-native-root-siblings](https://npm.io/package/react-native-root-siblings.md) — 102.9K weekly downloads
- [post-robot](https://npm.io/package/post-robot.md) — 93.7K weekly downloads
- [@praxisui/dialog](https://npm.io/package/@praxisui/dialog.md) — 2.0K weekly downloads
- [easy-toggle-state](https://npm.io/package/easy-toggle-state.md) — 350 weekly downloads
- [ngx-lightbox-evp](https://npm.io/package/ngx-lightbox-evp.md) — 19 weekly downloads

## Recent versions

- 1.1.0 (latest) — 2016-02-16
- 1.0.0 — 2015-09-09

## README

# create-svg-size [![Build Status](https://travis-ci.org/bendrucker/create-svg-size.svg?branch=master)](https://travis-ci.org/bendrucker/create-svg-size)

> Create an svg object with a given x/y width/height


## Install

```
$ npm install --save create-svg-size
```


## Usage

```js
var size = require('create-svg-size')

size({x: 10, y: 20})
//=> {width: '10px', height: '20px', viewBox: '0 0 10 20'}
```

## API

#### `size(dimensions)` -> `object`

##### dimensions

*Required*  
Type: `object`

An object with x/y dimensions for the svg. The dimensions can also contain an optional `responsive` boolean that will set the width/height to 100% but set the `viewBox` appropriately.


## License

MIT © [Ben Drucker](http://bendrucker.me)

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