# svg-attribute-namespace

> get namespace of svg attribute

Latest version **2.1.0** (published 2015-12-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install svg-attribute-namespace
pnpm add svg-attribute-namespace
yarn add svg-attribute-namespace
bun add svg-attribute-namespace
```

## 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 | 2.1.0 |
| Published | 2015-12-20 |
| First published | 2015-12-19 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mikey |
| Maintainers | ahdinosaur |
| Keywords | svg, attribute, namespace, setAttributeNS, dom |

## Links

- npm: https://www.npmjs.com/package/svg-attribute-namespace
- Repository: https://github.com/ahdinosaur/svg-attribute-namespace
- Homepage: https://github.com/ahdinosaur/svg-attribute-namespace#readme
- Issues: https://github.com/ahdinosaur/svg-attribute-namespace/issues
- npm.io page: https://npm.io/package/svg-attribute-namespace

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2015-12-20
- 2.0.0 — 2015-12-20
- 1.1.1 — 2015-12-20
- 1.1.0 — 2015-12-20
- 1.0.0 — 2015-12-19

## 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`](https://www.npmjs.com), 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)
}
```

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