How to use is-equal-shallow - 1 common examples

To help you get started, we’ve selected a few is-equal-shallow 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 u-wave / web / src / store / persistSettings.js View on Github external
store.subscribe(() => {
    const newSettings = store.getState().settings;
    if (!isEqual(prevSettings, newSettings)) {
      attempt(() => localStorage.setItem(SETTINGS_KEY, JSON.stringify(newSettings)));
    prevSettings = newSettings;
  return store;


Does a shallow comparison of two objects, returning false if the keys or values differ.

Latest version published 8 years ago

Package Health Score

68 / 100
Full package analysis

Popular is-equal-shallow functions