UNPKG

d3-view

Version:

View-model d3 plugin for building interactive data-driven web interfaces

11 lines (10 loc) • 281 B
// Update a model with reactive model data export default function(data, replace) { if (data) { replace = arguments.length === 2 ? replace : true; for (var key in data) { if (replace || this[key] === undefined) this.$set(key, data[key]); } } return this; }