From 04991c13a69ed68ee4c4b2c334deaa48271c30e6 Mon Sep 17 00:00:00 2001 From: Graham Fairweather Date: Mon, 26 Feb 2018 08:53:24 +0100 Subject: [PATCH] Kebab join utility for composing reuseable contants from smaller parts --- src/utils/assist.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/assist.js b/src/utils/assist.js index 33828da7..78708722 100644 --- a/src/utils/assist.js +++ b/src/utils/assist.js @@ -320,4 +320,6 @@ export function setMatchMedia () { }; window.matchMedia = window.matchMedia || matchMediaPolyfill; } -} \ No newline at end of file +} + +export const kebabJoin = (...args) => args.map(arg => `${arg}`).join('-');