1 | /*
|
2 | Copyright (c) 2014 Google Inc. All rights reserved.
|
3 |
|
4 | Use of this source code is governed by the MIT License, available in this package's LICENSE file
|
5 | or at http://opensource.org/licenses/MIT.
|
6 | */
|
7 | ;
|
8 |
|
9 | function callFunction(targetPath, parentModule, func) {
|
10 | if (!func) {
|
11 | return '';
|
12 | }
|
13 |
|
14 | return func(targetPath, parentModule);
|
15 | }
|
16 |
|
17 | exports.before = function before(targetPath, parentModule, options) {
|
18 | return callFunction(targetPath, parentModule, options.before);
|
19 | };
|
20 |
|
21 | exports.after = function after(targetPath, parentModule, options) {
|
22 | return callFunction(targetPath, parentModule, options.after);
|
23 | };
|