Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
function d3_class(ctor, properties) {
  try {
    for (var key in properties) {
      Object.defineProperty(ctor.prototype, key, {
        value: properties[key],
        enumerable: false
      });
    }
  } catch (e) {
    ctor.prototype = properties;
  }
}
New to GrepCode? Check out our FAQ X