How to use the @antv/g2/lib/core.Util.each function in @antv/g2

To help you get started, we’ve selected a few @antv/g2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alibaba / BizCharts / src / shared / util.js View on Github external
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
      return false;
    }

    if (Util.isArray(objA) !== Util.isArray(objB)) {
      return false;
    }

    if (length(objA) !== length(objB)) {
      return false;
    }

    let ret = true;

    Util.each(objA, (v, k) => {
      if (!is(v, objB[k])) {
        ret = false;
        return ret;
      }
      return true;
    });

    return ret;
  },
github alibaba / BizCharts / src / shared / util.js View on Github external
without(objA, keys = []) {
    const ret = {};
    Util.each(objA, (v, k) => {
      if (Util.indexOf(keys, k) === -1) {
        ret[k] = v;
      }
    });
    return ret;
  },