@f/is-svg

    1.0.0 • Public • Published

    is-svg

    Build status Git tag NPM version Code style

    Check whether or not a tag name is an SVG element

    Installation

    $ npm install @f/is-svg
    

    Usage

    var isSvg = require('@f/is-svg')
    
    function createElement (tag) {
      return isSvg(tag)
        ? document.createElementNS(tag, svgNs)
        : document.createElement(tag)
    }

    API

    isSvg(arg)

    • arg -

    Returns:

    License

    MIT

    Keywords

    none

    Install

    npm i @f/is-svg

    DownloadsWeekly Downloads

    9,510

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • f