Skip to content

Instantly share code, notes, and snippets.

@borlaym
Created October 3, 2019 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save borlaym/eceef46944132a4c1c42ba077001a210 to your computer and use it in GitHub Desktop.
Save borlaym/eceef46944132a4c1c42ba077001a210 to your computer and use it in GitHub Desktop.
The issue
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