Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

Low-prio: failing when something after CLOSE_CURLY #3

Closed
tunnckoCore opened this issue Jan 29, 2016 · 3 comments
Closed

Low-prio: failing when something after CLOSE_CURLY #3

tunnckoCore opened this issue Jan 29, 2016 · 3 comments

Comments

@tunnckoCore
Copy link
Owner

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
Copy link
Owner Author

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.

@tunnckoCore tunnckoCore changed the title failing when something after CLOSE_CURLY Low-prio: failing when something after CLOSE_CURLY Oct 6, 2017
@ericmorand
Copy link
Contributor

I tend to agree that this lib should not handle that case which is not a function.

@tunnckoCore
Copy link
Owner Author

Okey, closing. If anyone has some thoughts then to feel free to share.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants