Skip to content

Commit

Permalink
Remove arrow functions (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyerburgh authored and okuryu committed Dec 28, 2018
1 parent 8c10244 commit d175fe2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,14 @@ module.exports = function serialize(obj, options) {
}

var argsStartsAt = serializedFn.indexOf('(');
var def = serializedFn.substr(0, argsStartsAt).trim().split(' ').filter(val => val.length > 0);
var nonReservedSymbols = def.filter(val => RESERVED_SYMBOLS.indexOf(val) === -1);
var def = serializedFn.substr(0, argsStartsAt)
.trim()
.split(' ')
.filter(function(val) { return val.length > 0 });

var nonReservedSymbols = def.filter(function(val) {
return RESERVED_SYMBOLS.indexOf(val) === -1
});

// enhanced literal objects, example: {key() {}}
if(nonReservedSymbols.length > 0) {
Expand Down

1 comment on commit d175fe2

@krutzler

This comment was marked as outdated.

Please sign in to comment.