Skip to content

Commit

Permalink
Included markdown links in output
Browse files Browse the repository at this point in the history
  • Loading branch information
BadIdeaException committed Jan 5, 2024
1 parent d76647b commit 7c8b6de
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ new Benchmark.Suite('object-selectors vs. easy-object-selector')
getvalue(obj, selector);
})
.on('cycle', function(event) {
const links = {
'easy-object-selector': 'https://github.com/deltavi/easy-object-selector',
'object-path': 'https://github.com/mariocasciaro/object-path',
'dot-prop': 'https://github.com/sindresorhus/dot-prop',
'pathval': 'https://github.com/chaijs/pathval',
'getvalue': 'https://github.com/jonschlinkert/get-value'
}
// Replace competitors with markdown links
if (event.target.name in links)
event.target.name = `[${event.target.name}](${links[event.target.name]})`;
console.log(String(event.target)
// Replace " x ", if followed immediately by a digit, with " | "
.replace(/ x (?=\d)/, ' | '));
Expand Down

0 comments on commit 7c8b6de

Please sign in to comment.