Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: bu/nodejs_party_26
base: d956053d8d
...
head fork: bu/nodejs_party_26
compare: b0ee643ed1
  • 2 commits
  • 6 files changed
  • 0 commit comments
  • 1 contributor
View
1  .gitignore
@@ -0,0 +1 @@
+node_modules
View
7 async.waterfall.js
@@ -0,0 +1,7 @@
+var async = require("async");
+
+async.waterfall([
+
+], function (err, result) {
+ // result now equals 'done'
+});
View
17 callback.js
@@ -0,0 +1,17 @@
+
+loadLanguage(function(err, lang) {
+ if(err) {
+ console.log(err);
+ }
+
+ loadLanguage(function(err, lang) {
+ if(err) {
+ console.log(err);
+ }
+
+ loadLanguage(function(err, lang) {
+ if(err) {
+ console.log(err);
+ }
+
+});
View
37 q.promise.js
@@ -0,0 +1,37 @@
+var q = require("q");
+var fs = require("fs");
+
+q.fcall(cleanupRoom)
+ .then(buySomthing)
+ .then(payTheBill, function(err) {
+ console.log(err);
+ })
+ .then(function() {
+ console.log("Yeah!");
+ });
+
+function cleanupRoom() {
+ console.log("1");
+ return true;
+}
+
+function buySomthing(cleanup_Result) {
+ console.log(cleanup_Result);
+
+ var deferred = q.defer();
+
+ fs.writeFile("bu.txt", "bu", function(err) {
+ if(err) {
+ return deferred.reject(err);
+ }
+ console.log("2");
+ deferred.resolve(true);
+ });
+
+ return deferred.promise;
+}
+
+function payTheBill() {
+ console.log("3");
+ return true;
+}
View
7 test
@@ -0,0 +1,7 @@
+// this file will assert something
+// we use this file as unit testing
+
+module.exports = function() {
+
+
+};
View
0  test_module.js
No changes.

No commit comments for this range

Something went wrong with that request. Please try again.