New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

svg-create-element

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svg-create-element

create an svg element

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
37
-32.73%
Maintainers
1
Weekly downloads
 
Created
Source

svg-create-element

create an svg element

example

var createElement = require('svg-create-element');

var svg = createElement('svg');
svg.appendChild(createElement('polyline', {
    stroke: 'cyan',
    strokeWidth: 4,
    fill: 'transparent',
    points: [ [ 5, 50 ], [ 450, 100 ], [ 300, 300 ], [ 150, 220 ] ].join(' ')
}));
document.body.appendChild(svg);

methods

var createElement = require('svg-create-element')

var elem = createElement(name, attr)

Create a new svg dom element elem named by the string name.

Optionally you can set attributes on the newly-created element by supplying attr mappings. Camel-cased attr keys will automatically be converted to hypthenated names.

install

With npm do:

npm install svg-create-element

license

MIT

Keywords

svg

FAQs

Package last updated on 03 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts