UNPKG

619 BJavaScriptView Raw
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'use strict';
8
9function callFunction(targetPath, parentModule, func) {
10 if (!func) {
11 return '';
12 }
13
14 return func(targetPath, parentModule);
15}
16
17exports.before = function before(targetPath, parentModule, options) {
18 return callFunction(targetPath, parentModule, options.before);
19};
20
21exports.after = function after(targetPath, parentModule, options) {
22 return callFunction(targetPath, parentModule, options.after);
23};