We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f0db5e7 commit e3b5661Copy full SHA for e3b5661
1 file changed
js-and-ts/format.js
@@ -0,0 +1,13 @@
1
+const surroundWithStars = (value) => {
2
+ const valueLength = value.toString().length;
3
+ const topBottomBorder = '*'.repeat(valueLength + 2);
4
+
5
+ return topBottomBorder
6
+ + "\n"
7
+ + '*' + value.toString() + '*'
8
9
+ + topBottomBorder;
10
+}
11
12
+module.exports.Formatter = { surroundWithStars };
13
0 commit comments