From 87f5cdf5d7855bd82ed9716a0c464f4cc2eacd20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Hammer=20H=C3=A5versen?= <37153174+AndreasHaaversen@users.noreply.github.com> Date: Tue, 24 Oct 2023 17:08:55 +0200 Subject: [PATCH] Fix tag stringification example (#99) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aa225ec..e0112bc 100644 --- a/README.md +++ b/README.md @@ -123,12 +123,12 @@ If you need to stringify these you can use the following algo: ```js const stringify = (title, metas, links) => { const stringifyTag = (tagName, tags) => - tags.reduce((acc, tag) => { + tags.reduce((acc, tag) => `${acc}<${tagName}${Object.keys(tag).reduce( (properties, key) => `${properties} ${key}="${tag[key]}"`, '' - )}>`; - }, ''); + )}>` + , ''); return ` ${title}