Skip to content

Commit

Permalink
bin: remove arrow functions for Node 0.12 support
Browse files Browse the repository at this point in the history
Commit 22b7aa5 ("Move main logic from bin file (#9)") broke
tap-difflet Node 0.10 and 0.12 support due to its use of arrow
functions, which aren't supported by old versions of Node.

This was spotted trying to upgrade node-nanomsg to use tap-difflet.

Fixes #13
  • Loading branch information
nickdesaulniers committed Jul 1, 2019
1 parent 1bfe834 commit 267315e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/tap-difflet
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var options = docopt(usage, {

function getOptionsWithoutDashes(options) {
const transformedOptions = {}
Object.keys(options).forEach(key => {
Object.keys(options).forEach(function(key) {
const keyWithoutDashes = key.replace(/^(--|-)/, '');
transformedOptions[keyWithoutDashes] = options[key];
});
Expand Down

0 comments on commit 267315e

Please sign in to comment.