Git Product home page Git Product logo

Comments (8)

TooTallNate avatar TooTallNate commented on May 31, 2024 1

Well it's your patch. I look forward to the upcoming release 👍

from parse-function.

the1mills avatar the1mills commented on May 31, 2024 1

🐯🐯🐯🐯🐯🐯🐯🐯

from parse-function.

tunnckoCore avatar tunnckoCore commented on May 31, 2024

Hey there! 👋 Thanks for the report, it sounds me like problem here.
I bet it's because of this here src/index.js#L106-L113.

The idea about that if there, is if we have passed async method, then we should wrap it in object, so the parser can parse it correctly.

Can you try to add this check too and try again if it works

const isAsyncArrow = result.value.startsWith('async')

if (!(isFunction || isAsyncFn || isAsyncArrow) && isMethod) {
  result.value = `{ ${result.value} }`
}

Another reason and probably limitation is that we use babylon.parseExpression by default here, but as i remember, it was intentional.

from parse-function.

TooTallNate avatar TooTallNate commented on May 31, 2024

@charlike The patch works for me 👍 Thank you for the quick turnaround on that!

from parse-function.

tunnckoCore avatar tunnckoCore commented on May 31, 2024

Sweeeet! :D I love myself sometimes for such fast responses with good end :)

PR is welcome, otherwise i can push patch in coming days. Let me know if you need some help on contributing.

from parse-function.

tunnckoCore avatar tunnckoCore commented on May 31, 2024

@the1mills what? 😹 haha

@TooTallNate actually, yea, but it's not a problem for me. Go pr if you need it more soon.

from parse-function.

TooTallNate avatar TooTallNate commented on May 31, 2024

Please see #63.

@charlike P.S. I'd be happy to be added as a contributor, if this module has become a burden on your time.

from parse-function.

tunnckoCore avatar tunnckoCore commented on May 31, 2024

heya, just seen your comment here.

if this module has become a burden on your time

no, it's not, just i'm in period of switching ISP providers and following through smartphone is hard, haha.

i'll add you once I get stability and time, no problem :)

from parse-function.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.