starlight
starlight copied to clipboard
Allow user to customise available global variables
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().
Please add a thumbsup reaction if you'd like to see this feature, this'll help me to prioritise.