Skip to content

common: allow promises to resolve with a single arg#2096

Merged
stephenplusplus merged 3 commits intogoogleapis:masterfrom
callmehiphop:dg--single-promise-resolve
Mar 17, 2017
Merged

common: allow promises to resolve with a single arg#2096
stephenplusplus merged 3 commits intogoogleapis:masterfrom
callmehiphop:dg--single-promise-resolve

Conversation

@callmehiphop
Copy link
Contributor

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 17, 2017
@callmehiphop
Copy link
Contributor Author

/cc @schmidt-sebastian

*
* @param {function} originalMethod - The method to promisify.
* @param {object=} options - Promise options.
* @param {boolean} options.singular - Resolve the promise with single arg

This comment was marked as spam.

This comment was marked as spam.

}

resolve(callbackArgs);
if (options.singular && callbackArgs.length === 1) {

This comment was marked as spam.

This comment was marked as spam.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 3d03749 on callmehiphop:dg--single-promise-resolve into ** on GoogleCloudPlatform:master**.

@stephenplusplus stephenplusplus merged commit fe4e8f7 into googleapis:master Mar 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement. core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants