Skip to content

Commit af1fd96

Browse files
committed
Add comments and formating
1 parent 5c47a2e commit af1fd96

File tree

8 files changed

+14
-1
lines changed

8 files changed

+14
-1
lines changed

JavaScript/1-wrap-function.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ const wrap = (fn) => {
1212
};
1313
};
1414

15+
// Usage:
16+
1517
const func = (par1, par2) => {
1618
console.dir({ method: { par1, par2 } });
1719
return [par1, par2];

JavaScript/2-wrap-callback.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ function wrapFunction(fn) {
3535
};
3636
}
3737

38+
// Usage:
39+
3840
const interfaceName = {
3941
methodName(par1, par2, callback) {
4042
console.dir({ method: { par1, par2 } });

JavaScript/3-wrap-api.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ function wrapFunction(fn) {
2222
};
2323
}
2424

25+
// Usage:
26+
2527
const interfaceName = {
2628
methodName(par1, par2) {
2729
console.dir({ method: { par1, par2 } });

JavaScript/5-wrap-timeout-async.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ function timeout(msec, fn) {
1616
};
1717
}
1818

19+
// Usage:
20+
1921
const fn = (par, callback) => {
2022
console.log('Function called, par: ' + par);
2123
callback(null, par);

JavaScript/6-wrap-once.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ const once = (fn) => {
1212
};
1313
};
1414

15+
// Usage:
16+
1517
const fn = (par) => {
1618
console.log('Function called, par: ' + par);
1719
};

JavaScript/7-wrap-count.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ const limit = (count, fn) => {
1212
};
1313
};
1414

15+
// Usage:
16+
1517
const fn = (par) => {
1618
console.log('Function called, par: ' + par);
1719
};

JavaScript/8-cancelable.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ const cancelable = (fn) => {
1010
return wrapper;
1111
};
1212

13+
// Usage:
14+
1315
const fn = (par) => {
1416
console.log('Function called, par: ' + par);
1517
};

JavaScript/9-wrap.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,3 @@ setTimeout(() => {
4444
f.cancel();
4545
f('4th');
4646
}, 150);
47-

0 commit comments

Comments
 (0)