Skip to content

Commit

Permalink
Use normal functions in deindent / collapse for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
gustav-olsen-groupone committed Nov 20, 2018
1 parent 870b847 commit 6ce3e3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/collapse.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import zip from "./utils/zip";

const collapse = (strs, ...args) =>
zip(strs, ...args)
export default function collapse(strs, ...args) {
return zip(strs, ...args)
.map(str => {
return str
.split("\n")
Expand All @@ -12,5 +12,4 @@ const collapse = (strs, ...args) =>
.join(" ");
})
.join("");

export default collapse;
}
6 changes: 2 additions & 4 deletions src/deindent.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import zip from "./utils/zip";

const deindent = (strs, ...args) => {
export default function deindent(strs, ...args) {
const str = zip(strs, ...args).join("");

const lines = str.split("\n");
Expand Down Expand Up @@ -41,6 +41,4 @@ const deindent = (strs, ...args) => {
return strs;
}, [])
.join("\n");
};

export default deindent;
}

0 comments on commit 6ce3e3b

Please sign in to comment.