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
| function getCost(cell) { | |
| return cell.match(/\$[\d.,]+\d/)[0] | |
| } | |
| function getCondition(cell) { | |
| return cell.match(/((like )?new|used|mint|good|great|excellent)/i)[0] | |
| } | |
| function getEmail(cell) { | |
| return (cell.match(/[^\s@]+@[^\s@]+/i) || ['N/A'])[0] |
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
| const intRegex = /^(0|[1-9]\d*)$/; | |
| let isIndex = prop => | |
| typeof prop === 'string' | |
| && intRegex.test(prop); | |
| let concat = (left, right) => { | |
| let w = left.length; | |
| let h = right.length; |
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
| let timer = (ms) => new Promise(resolve => setTimeout(resolve, ms)); | |
| let producer = async function*() { | |
| let counter = 0; | |
| while (true) { | |
| let delay = Math.random() * 1000; | |
| await timer(delay); | |
| yield counter++; | |
| } | |
| }; |
OlderNewer