MCPcopy Create free account
hub / github.com/breck7/scroll / attrFunction

Function attrFunction

external/.d3.js:4472–4485  ·  view source on GitHub ↗
(name, interpolate, value)

Source from the content-addressed store, hash-verified

4470}
4471
4472function attrFunction(name, interpolate, value) {
4473 var string00,
4474 string10,
4475 interpolate0;
4476 return function() {
4477 var string0, value1 = value(this), string1;
4478 if (value1 == null) return void this.removeAttribute(name);
4479 string0 = this.getAttribute(name);
4480 string1 = value1 + "";
4481 return string0 === string1 ? null
4482 : string0 === string00 && string1 === string10 ? interpolate0
4483 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
4484 };
4485}
4486
4487function attrFunctionNS(fullname, interpolate, value) {
4488 var string00,

Callers

nothing calls this directly

Calls 2

interpolateFunction · 0.85
getAttributeMethod · 0.80

Tested by

no test coverage detected