How to use the value-or-function.apply function in value-or-function

To help you get started, we’ve selected a few value-or-function examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gulpjs / resolve-options / index.js View on Github external
function toResolve() {
      stack.push(key);
      var option = normalize.apply(resolver, args);

      if (option == null) {
        option = fallback;
        if (typeof option === 'function') {
          option = option.apply(resolver, appliedArgs);
        }
      }

      return option;
    }

value-or-function

Normalize a value or function, applying extra args to the function

MIT
Latest version published 2 years ago

Package Health Score

68 / 100
Full package analysis