|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
514 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 | var path = require('../internals/path');
|
|---|
| 3 | var globalThis = require('../internals/global-this');
|
|---|
| 4 | var isCallable = require('../internals/is-callable');
|
|---|
| 5 |
|
|---|
| 6 | var aFunction = function (variable) {
|
|---|
| 7 | return isCallable(variable) ? variable : undefined;
|
|---|
| 8 | };
|
|---|
| 9 |
|
|---|
| 10 | module.exports = function (namespace, method) {
|
|---|
| 11 | return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(globalThis[namespace])
|
|---|
| 12 | : path[namespace] && path[namespace][method] || globalThis[namespace] && globalThis[namespace][method];
|
|---|
| 13 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.