mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add makeSummaryOfListings helper
This commit is contained in:
parent
e6f520ca45
commit
021a05ee1c
1 changed files with 7 additions and 0 deletions
|
|
@ -246,3 +246,10 @@ export function findCategoryForTagsSet ( tags ) {
|
|||
|
||||
return null
|
||||
}
|
||||
|
||||
export function makeSummaryOfListings ({ list, length = 25 } = {}) {
|
||||
return list
|
||||
.slice(0, length)
|
||||
.map( listing => listing.name )
|
||||
.join(', ') + ', etc...'
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue