Show HN: Markdown to PDF converter site (www.markdownpdfconverter.com)
4 pointsby papaver7 comments
// pull traits dictionary out of tokens
const extractTraits = R.pipe(
R.map(R.pipe(
R.last,
R.prop('attributes'))),
R.reject(R.isNil),
R.reduce(R.mergeWith(concatValues), {}),
R.map(R.pipe(
R.unless(R.is(Array), R.of),
R.groupBy(R.identity),
R.map(R.count(R.identity)),
R.toPairs,
R.sortBy(R.prop(0)),
R.map(R.zipObj(['name', 'count'])))));