Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for function-bind operator e.g. func::bind(this) #1

Merged
merged 1 commit into from
May 24, 2016

Conversation

jayphelps
Copy link
Contributor

The function-bind operator is a proposed addition to JavaScript that is supported by Babel and is a great use case for a utility like this.

func::bind(this);
// is functionally equivalent to
bind.call(func, this);

@@ -43,6 +43,11 @@ function releaseBind(secondMap, thisArg) {
* @template T
*/
export function bind(target, thisArg) {
if (this !== undefined) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add comment like this:

// support for `bind.call(func, this);`
// see https://github.com/azu/idempotent-bind/pull/1

@azu
Copy link
Owner

azu commented May 23, 2016

@jayphelps Thanks for pull request!
I'll merge feature after you have fixed the comment https://github.com/azu/idempotent-bind/pull/1/files#r64170110

@jayphelps
Copy link
Contributor Author

@azu Done.

@azu azu merged commit abf3491 into azu:master May 24, 2016
@azu
Copy link
Owner

azu commented May 24, 2016

Thanks. publish 1.1.0

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

Successfully merging this pull request may close these issues.

None yet

2 participants