Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lukem512/extract-svg-viewbox
Extracts the viewBox information from an SVG string
https://github.com/lukem512/extract-svg-viewbox
extract-svg-viewbox svg viewbox viewbox-information
Last synced: about 8 hours ago
JSON representation
Extracts the viewBox information from an SVG string
- Host: GitHub
- URL: https://github.com/lukem512/extract-svg-viewbox
- Owner: lukem512
- Created: 2017-03-30T11:58:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-19T15:40:51.000Z (over 7 years ago)
- Last Synced: 2024-11-11T21:54:24.067Z (9 days ago)
- Topics: extract-svg-viewbox, svg, viewbox, viewbox-information
- Language: JavaScript
- Size: 3.91 KB
- Stars: 2
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# extract-svg-viewbox
[![Build Status](https://travis-ci.org/lukem512/extract-svg-viewbox.svg?branch=master)](https://travis-ci.org/lukem512/extract-svg-viewbox) ![Build Status](https://david-dm.org/lukem512/extract-svg-viewbox.svg) [![npm](https://img.shields.io/npm/l/extract-svg-viewbox.svg)](https://www.npmjs.com/package/extract-svg-viewbox) [![npm](https://img.shields.io/npm/v/extract-svg-viewbox.svg)](https://www.npmjs.com/package/extract-svg-viewbox) [![npm](https://img.shields.io/npm/dm/extract-svg-viewbox.svg)](https://www.npmjs.com/package/extract-svg-viewbox)
Extracts the viewBox information from an SVG string.
## Install
```
npm i --save extract-svg-viewbox
```## Usage
```js
const extract = require('extract-svg-viewbox')const svg = `
`const viewBox = extract(svg)
console.log(viewBox) // "0 0 460 460"
```## Related Modules
[normalize-svg-coords](https://github.com/lukem512/normalize-svg-coords)
## License
MIT © Luke Mitchell