some

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Some
const disableReset = () => {
    if (reportVisuals) {
      const visualArray = getVisualValues(reportVisuals);
      if (checkReportHasFilters(visualArray)) {
        const hasError = visualArray.some(visual =>
          _get(visual, 'error', false),
        );
        setCheckDisableReset(hasError);
      }
    }
  };
ready
for each
const disableReset = () => {
      if (reportVisuals) {
        let disable = false;
        Object.keys(reportVisuals).forEach(key => {
          const visualObject = reportVisuals[key];
          if (checkVisualIsFilter(visualObject)) {
            const hasError = _get(visualObject, 'error', false);
            if (hasError) {
              disable = true;
            }
          }
        });
        setCheckDisableReset(disable);
      }
    };
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.