Created
September 25, 2022 17:48
-
-
Save yano3nora/625e826c0c34a35032bce4ea1c2841be to your computer and use it in GitHub Desktop.
[js: fast-deep-equal] #js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* https://github.com/epoberezkin/fast-deep-equal | |
*/ | |
import equal from 'fast-deep-equal' | |
/** | |
* rxjs で complex な state の前後比較のため | |
* distinctUntilChanged に食わせる想定の | |
* array, object 対応な深い比較用 callback | |
*/ | |
export const deepComparator = <T>(a: T, b: T) => equal(a, b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment