Skip to content

Instantly share code, notes, and snippets.

@kmelve
Last active January 29, 2021 14:07
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save kmelve/ac89b85cb578ee68f4d3ddb8238be8a1 to your computer and use it in GitHub Desktop.
Save kmelve/ac89b85cb578ee68f4d3ddb8238be8a1 to your computer and use it in GitHub Desktop.
function episodeParser({
id,
title,
description = 'No summary',
optionalField,
anotherOptionalField
}) {
return {
guid: id,
title,
summary: description,
...(optionalField && {optionalField}),
...(anotherOptionalField && {anotherOptionalField})
}
}
@MarcelloTheArcane
Copy link

Are you missing a ) on line 12?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment