@f/svg-attribute-namespace

get namespace of svg attribute

Stats

StarsIssuesVersionUpdatedCreatedSize
@f/svg-attribute-namespace
012.1.16 years ago6 years agoMinified + gzip package size for @f/svg-attribute-namespace in KB

Readme

svg-attribute-namespace

get namespace of svg attribute

code copied from (virtual-hyperscript/svg-attribute-namespace](https://raw.githubusercontent.com/Matt-Esch/virtual-dom/master/virtual-hyperscript/svg-attribute-namespace.js), .

Install

with npm, run

npm install --save svg-attribute-namespace

Usage

var svgAttributeNamespace = require('svg-attribute-namespace')

svgAttributeNamespace(attributeName) -> namespace

Example

var svgAttributeNS = require('svg-attribute-namespace')

function setAttribute (node, name, value) {
  var namespace = svgAttributeNs(name)
  node.setAttributeNS(namespace, name, value)
}

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.