Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but 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
1  .gitignore
View
@@ -0,0 +1 @@
+node_modules
7 async.waterfall.js
View
@@ -0,0 +1,7 @@
+var async = require("async");
+
+async.waterfall([
+
+], function (err, result) {
+ // result now equals 'done'
+});
17 callback.js
View
@@ -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);
+ }
+
+});
37 q.promise.js
View
@@ -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;
+}
7 test
View
@@ -0,0 +1,7 @@
+// this file will assert something
+// we use this file as unit testing
+
+module.exports = function() {
+
+
+};
0  test_module.js
View
No changes.

No commit comments for this range

Something went wrong with that request. Please try again.