Add head/tail to file

This commit is contained in:
Berkeley Martinez
2016-05-14 16:46:20 -07:00
parent 9a7d9cc953
commit 2573dc0b22
3 changed files with 8 additions and 5 deletions

View File

@@ -27,7 +27,7 @@ export function decodeFccfaaAttr(value) {
);
}
export function arrayToNewLineString(seedData = []) {
export function arrayToString(seedData = ['']) {
seedData = Array.isArray(seedData) ? seedData : [seedData];
return seedData.reduce((seed, line) => '' + seed + line + '\n', '\n');
}
@@ -35,7 +35,7 @@ export function arrayToNewLineString(seedData = []) {
export function buildSeed({ challengeSeed = [] } = {}) {
return compose(
decodeSafeTags,
arrayToNewLineString
arrayToString
)(challengeSeed);
}