pete/lib/include

(require("pete/lib/include"))(id) → {any}

Description:
  • Tries to return whatever was returned from require or NULL (if module could not be loaded).
    If id is not a string, it will be returned without calling require for anything.

Source:
See:
Example
var factory = include('./local/module') || include('global-module');
Parameters:
Name Type Description
id string

module name or path (just like for external:require)

Returns:
Type
any