Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

get-built-in.js 393B

1234567891011
  1. 'use strict';
  2. var globalThis = require('../internals/global-this');
  3. var isCallable = require('../internals/is-callable');
  4. var aFunction = function (argument) {
  5. return isCallable(argument) ? argument : undefined;
  6. };
  7. module.exports = function (namespace, method) {
  8. return arguments.length < 2 ? aFunction(globalThis[namespace]) : globalThis[namespace] && globalThis[namespace][method];
  9. };