in src/main/java/org/apache/sling/scripting/sightly/js/impl/use/UseFunction.java [67:80]
public Object call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) {
Function function;
List<String> depNames;
if (args.length == 0) {
throw new IllegalArgumentException("Not enough arguments for use");
} else if (args.length == 1) {
function = decodeCallback(args[0]);
depNames = Collections.emptyList();
} else {
function = decodeCallback(args[1]);
depNames = decodeDepNames(args[0]);
}
return use(depNames, function, cx, scope);
}