Wednesday, 15 July 2015

javascript - What is the shorthand in d3 for the identity function ("function(d) { return d; }")? -


Looking through the D3 docs, I have been duplicated this code (identity function) everywhere:
  

Function (D) {return D; }

Is there a built-in method in D3 to do this? I know that I can not identify myself and use it everywhere, but it seems that D3 should provide it.



No comments:

Post a Comment