Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(err, results) => {
if (err == null) exit0 (S.joinWith ('') (results)); else exit1 (err);
}
);
const concatFiles = path => {
const readFileRel = S.compose (readFile) (path);
const index = readFileRel ('index.txt');
const files = righto.sync (S.compose (S.map (readFileRel)) (S.lines), index);
return righto.sync (S.joinWith (''), righto.all (files));
};
const lookupTypeClass = tcm => tcName => {
const tc = tcm[tcName];
if (!tc) {
const allTypeClasses = S.pipe ([S.keys, S.joinWith (', ')]) (tcm);
throw new TypeError (`Type class ${tcName} not found. Available type `
+ `classes are: ${allTypeClasses}`);
}
return tc;
};
const main = () => {
const path = join (process.argv[2]);
S.pipe ([path,
readFile,
S.lines,
S.map (path),
S.map (readFile),
S.joinWith (''),
exit0])
('index.txt');
};
readFile (path (file)) ((err, data) => {
if (err != null) exit1 (err);
$results[idx] = data;
filesRead += 1;
if (filesRead === filenames.length) exit0 (S.joinWith ('') ($results));
});
});