Low-prio: failing when something after CLOSE_CURLY
tunnckoCore opened this issue · 3 comments
tunnckoCore commented
e.g.
var parseFunction = require('parse-function')
var fnStr = 'function (a) {return a}; var b = 1'
var data = parseFunction(fnStr)
console.log(data.body) // => 'return a}; var b = ' instead of 'return a'resolved locally
tunnckoCore commented
Should we handle this? This lib isn't meant to do that, in my opinion. It is meant to be passed with an actual function, so such scenario is rare case.
ericmorand commented
I tend to agree that this lib should not handle that case which is not a function.
tunnckoCore commented
Okey, closing. If anyone has some thoughts then to feel free to share.