MCPcopy Create free account
hub / github.com/Lucifier129/react-lite / getNodeName

Function getNodeName

examples/simple/react.js:1868–1870  ·  view source on GitHub ↗

* Extracts the `nodeName` from a string of markup. * * NOTE: Extracting the `nodeName` does not require a regular expression match * because we make assumptions about React-generated markup (i.e. there are no * spaces surrounding the opening tag and there is at least one attribute). * * @param

(markup)

Source from the content-addressed store, hash-verified

1866 * @see http://jsperf.com/extract-nodename
1867 */
1868function getNodeName(markup) {
1869 return markup.substring(1, markup.indexOf(' '));
1870}
1871
1872var Danger = {
1873

Callers 2

react.jsFile · 0.85
createNodesFromMarkupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected