MCPcopy Create free account
hub / github.com/breck7/scroll / parseTypenames$1

Function parseTypenames$1

external/.d3.js:1568–1575  ·  view source on GitHub ↗
(typenames, types)

Source from the content-addressed store, hash-verified

1566}
1567
1568function parseTypenames$1(typenames, types) {
1569 return typenames.trim().split(/^|\s+/).map(function(t) {
1570 var name = "", i = t.indexOf(".");
1571 if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
1572 if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
1573 return {type: t, name: name};
1574 });
1575}
1576
1577Dispatch.prototype = dispatch.prototype = {
1578 constructor: Dispatch,

Callers 1

.d3.jsFile · 0.85

Calls 5

mapMethod · 0.80
splitMethod · 0.80
trimMethod · 0.80
indexOfMethod · 0.80
sliceMethod · 0.80

Tested by

no test coverage detected