Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update example.js

  • Loading branch information...
commit 1dca48223bcce4fb95ec13e97a8c7284d3f5fb1c 1 parent acc3f2c
Vadim Baryshev authored
Showing with 1 addition and 4 deletions.
  1. +1 −4 examples/example.js
5 examples/example.js
View
@@ -2,7 +2,7 @@ var aop = require('./../lib/aop');
var cache = {};
-var someAsyncFunction = function fnName(num, callback) {
+var someAsyncFunction = function(num, callback) {
console.log('calculating');
var result = num * 2;
callback(null, result);
@@ -10,7 +10,6 @@ var someAsyncFunction = function fnName(num, callback) {
};
var cacheAspect = function(method, params) {
- console.log(method.name);
var num = params[0];
if (cache[num]) {
var callback = params[params.length - 1];
@@ -22,13 +21,11 @@ var cacheAspect = function(method, params) {
};
var changeAspect = function(method, params) {
- console.log(this.name);
params[0]++;
method.apply(this, params);
};
var formatAspect = function(method, params) {
- console.log(method.name);
var callback = params[params.length - 1];
var newCallback = function(error, result) {
callback(error, result + 's');
Please sign in to comment.
Something went wrong with that request. Please try again.