Functions related to processing text.
Functions related to processing text.
(attribution attribution-count item-count item-name authors)
Given the number of distinct authors to mention, the number of items, what to call the
item (needs to pluralize with just an 's'), and a sequence of authors of the items
to attribute (sequence needs to be distinct'able, and have a :name
property per author),
return a text string that attributes the authors to the items.
E.g.
(attribution 3 7 'comment' [{:name 'Joe'} {:name 'Joe'} {:name 'Moe'} {:name 'Flo'} {:name 'Flo'} {:name 'Sue'}]) '7 comments by Joe, Moe, Flo and others'
Given the number of distinct authors to mention, the number of items, what to call the item (needs to pluralize with just an 's'), and a sequence of authors of the items to attribute (sequence needs to be distinct'able, and have a `:name` property per author), return a text string that attributes the authors to the items. E.g. (attribution 3 7 'comment' [{:name 'Joe'} {:name 'Joe'} {:name 'Moe'} {:name 'Flo'} {:name 'Flo'} {:name 'Sue'}]) '7 comments by Joe, Moe, Flo and others'
(new-boards-summary-node new-boards-list board-url-fn)
Give the newly created boards list, creates a phrase like:
Give the newly created boards list, creates a phrase like: - Since your last digest, 1 topic was created: New topic. - Since your last digest, 2 topics were created: First topic and Second topic. - Since your last digest, 3 topics were created: First topic, Second topic and Third topic. - Since your last digest, 4 topics were created: First topic, Second topic, Third topic and Fourth topic.
(replies-summary-text {:keys [comment-count comment-authors entry-count]
:or {comment-count 0 comment-authors 0 entry-count 0}})
Given a replies summary map, creates a phrase like:
Given a replies summary map, creates a phrase like: - Sean Johnson left replies on updates you care about. - Sean Johnson and Stuart Levinson left replies on updates you care about. - Sean Johnson, Stuart Levinson and 1 other left 6 replies on updates you care about. - Sean Johnson, Stuart Levinson and 2 others left 6 replies on updates you care about.
(strip-xss-tags data)
Current xss tags are script, style, and input.
Current xss tags are script, style, and input.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close