Last active
April 28, 2020 18:12
-
-
Save szmeku/20e723d0e287790100a556a9788987fa to your computer and use it in GitHub Desktop.
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
| // before | |
| const filterPlatesToCombine = () => keys( | |
| pickBy((val, key) => val.combine === true && isEmpty(val.harvestBarcode), barcodeCombinations)) | |
| .map(val => { return {id: `plate-barcode-to-combine-${val}`, name: val} }); | |
| // after | |
| const platesWithOptions = [..te kombinacje ktore teraz masz..]; | |
| const toSortableItem = v => ({id: `plate-barcode-to-combine-${val}`, name: val}); | |
| const barcodesForCombinations = pipe( | |
| pickBy(allPass([ | |
| propEq('combine', true), | |
| propSatisfies(isEmpty, 'harvestBarcode') | |
| ])), | |
| keys, | |
| ); | |
| // someHtml | |
| <ul> | |
| {pipe( | |
| barcodesForCombinations, | |
| map(toSortableItem), | |
| v => <li>jakis html {v}</li> | |
| )(platesWithOptions)} | |
| </ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment