Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const main = () => {
const dir = process.argv[2];
kgo
('index', readFile('utf8', join(dir, 'index.txt')))
('filePaths', ['index'], kgo.sync(S.compose(R.map(join(dir)), S.lines)))
('files', ['filePaths'], R.partial(foreign.parallel, [readFile('utf8')]))
('concated', ['files'], kgo.sync(R.join('')))
(['concated'], data => {
process.stdout.write(data);
process.exit(0);
})
(['*'], err => {
process.stderr.write(String(err) + '\n');
process.exit(1);
});
};
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 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));
};
val = result
resolveIfDone()
})
})
}
LazyEither.prototype['fantasy-land/equals'] = function(other, resolve) {
this._value(res => {
other._value(S.compose(resolve, S.equals(res)))
})
}
LazyEither.lift = f => R.pipe(f, LazyEither.Right)
LazyEither.liftN = (n, f) => R.curryN(n, R.pipe(f, LazyEither.Right))
LazyEither.promote = S.compose(LazyEither, S.T)
module.exports = { LazyEither: LazyEither }