checks(item)

**checks(item)** (within telling.js See: Story Telling): This function checks for completed tasks (items marked with `- [x]`) in the text of an item. It splits the text into lines and filters those lines that start with `- [x]`. It returns an array of completed tasks.

Filter those lines that start with - [x]

export const checks = item => item.text.split(/\n/).filter(line => line.startsWith('- [x]'))

**Note**: The function `checks(item)` was made accessible with the help of the following Pharo snippet.

telling := JSParser parse: (ZnClient new get: 'http://ward.dojo.fed.wiki/assets/pages/story-telling/telling.js')

pages/story-telling