GithubHelp home page GithubHelp logo

Discussion about moviedb-promise HOT 3 CLOSED

grantholle avatar grantholle commented on August 30, 2024
Discussion

from moviedb-promise.

Comments (3)

mocanew avatar mocanew commented on August 30, 2024

I forgot to mention: I would love to help out.

from moviedb-promise.

grantholle avatar grantholle commented on August 30, 2024

Yeah, I've only recently started using async/await in a few things, so my familiarity with them is slowly increasing.

Making the switch wouldn't require too much refactoring. Thanks for the suggestion.

from moviedb-promise.

grantholle avatar grantholle commented on August 30, 2024

I've pushed up my changes where internally uses some async/await.

I don't think all the examples in the readme need to be changed. While using async functions is nice, it's a little cumbersome in my opinion. The examples in the readme could be run exactly as they are.

For example, if someone slapped this into a file to run,

const res = await moviedb.searchMovie({ query: 'alien' })
console.log(res)

it would fail because it's not inside of an async function. Also, it's foundational to understand Promises before understanding async/await.

I've included an example of how to use async/await, but don't think it's necessary to change all the examples.

from moviedb-promise.

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.