MCPcopy
hub / github.com/expressjs/generator / around

Function around

bin/express-cli.js:70–78  ·  view source on GitHub ↗

* Install an around function; AOP.

(obj, method, fn)

Source from the content-addressed store, hash-verified

68 */
69
70function around (obj, method, fn) {
71 var old = obj[method]
72
73 obj[method] = function () {
74 var args = new Array(arguments.length)
75 for (var i = 0; i < args.length; i++) args[i] = arguments[i]
76 return fn.call(this, old, args)
77 }
78}
79
80/**
81 * Install a before function; AOP.

Callers 1

express-cli.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected