Created
October 3, 2019 13:07
-
-
Save borlaym/b33bc45205040a274f2972df024b909a to your computer and use it in GitHub Desktop.
The issue
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 isKinjaVideo(blockNode: BlockNodeJSON): boolean { | |
return blockNode.type === 'KinjaVideo'; | |
} | |
export default function getKinjaVideoForPost(post: Post): Array<string> { | |
const videoNodes = post.body.filter(n => isKinjaVideo(n)); | |
return videoNodes.map(vn => vn.id); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment