Skip to content

Allow user to customise available global variables #24

@paulcuth

Description

@paulcuth

Add an array to the configuration object called libs. If present, parse the values in order and add/remove global vars according to the following rules:

value action
* Add all global methods and namespaces
.propName Add the propName global method only
libName Add the libName namespace and all its properties
libName.propName Add the propName property of libName only
-libName Remove libName namespace and therefore all its properties
-libName.propName Remove propName property of libName only

Examples:

[ '*', '-window' ]
All libs except window.

['.setmetatable', 'table']
setmetatable() and all of the table lib only.

['string', '-string.reverse']
Only the string lib without string.reverse().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions