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

Function before

bin/express-cli.js:84–91  ·  view source on GitHub ↗

* Install a before function; AOP.

(obj, method, fn)

Source from the content-addressed store, hash-verified

82 */
83
84function before (obj, method, fn) {
85 var old = obj[method]
86
87 obj[method] = function () {
88 fn.call(this)
89 old.apply(this, arguments)
90 }
91}
92
93/**
94 * Prompt for confirmation on STDOUT/STDIN

Callers 3

cmd.jsFile · 0.85
setupTestEnvironmentFunction · 0.85
express-cli.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected