Created
June 1, 2012 14:08
-
-
Save nowherenearithaca/2852410 to your computer and use it in GitHub Desktop.
d3.ns.qualify
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qualify: function(name) { | |
var i = name.indexOf(":"), | |
prefix = name; | |
if (i >= 0) { | |
prefix = name.substring(0, i); | |
name = name.substring(i + 1); | |
} | |
return d3_nsPrefix.hasOwnProperty(prefix) | |
? {space: d3_nsPrefix[prefix], local: name} | |
: name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment