Skip to content

Promises #17

@Polyneue

Description

@Polyneue

When a callback is not specified the methods should return a Promise to make it easier to work with in an async/await / promise based code base.

let data1;
Be.projects({q: 'motorcycle' }, function (err, res, data) {
  data1 = data;
})

// VS.

const data = await Be.projects({q: 'motorcycle'});

// VS.

Be.projects({q: 'motorcycle'})
  .then(function (data) {
    // do something
  })

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions