Created
December 2, 2021 11:41
-
-
Save yuripramos/2d492500c0322706b2cf873485e7776a to your computer and use it in GitHub Desktop.
Revisions
-
yuripramos created this gist
Dec 2, 2021 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ const tokens = ['USDC', 'USDT', 'ETH']; const contracts = [{contract:"#CAS#", tokens: ["BTC"]},{contract: "FSA@#", tokens:["ETH","USF"]},{contract: "8%SD8", tokens:["ETH" ]}] const intersection = contracts.filter(contract => tokens.some(token => { return contract.tokens.includes(token) }))