(require("pete/lib/include"))(id) → {any}
- Description:
Tries to return whatever was returned from
requireor NULL (if module could not be loaded).
Ifidis not a string, it will be returned without callingrequirefor 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