Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function episodeParser({
- id,
- title,
- description = 'No summary',
- optionalField,
- anotherOptionalField
- }) {
- return {
- guid: id,
- title,
- summary: description,
- ...(optionalField && {optionalField}),
- ...(anotherOptionalField && {anotherOptionalField})
- }
- }
Add Comment
Please, Sign In to add comment