Skip to content

added promise support #15

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 34 additions & 6 deletions jquery.basic_arithmetics.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

}


$.subtract = function() {

this.operate = function(i) {
Expand All @@ -53,8 +52,6 @@

}



$.multiply = function() {

this.operate = function(i) {
Expand All @@ -65,8 +62,7 @@
return this.result;

}



$.equals = function() {

this.operate = function(i) {
Expand All @@ -79,6 +75,38 @@

Operation.apply(this, arguments);
return this.result;
}

}

$.addAsync = function() {

console.log(arguments)
Copy link

Choose a reason for hiding this comment

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

Probably unintended console statement

return $.when($.add.apply(this, arguments))

}

$.subtractAsync = function() {

return $.when($.subtract.apply(this, arguments))

}

$.divideAsync = function() {

return $.when($.divide.apply(this, arguments))

}

$.multiplyAsync = function() {

return $.when($.multiply.apply(this, arguments))

}

$.equalsAsync = function() {

return $.when($.equals.apply(this, arguments))

}

}(jQuery));
2 changes: 1 addition & 1 deletion jquery.basic_arithmetics.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.