mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-01-20 15:58:50 +00:00
add widget name aliases.
This commit is contained in:
parent
89debe2577
commit
4fa34aa538
@ -47,3 +47,14 @@ widget.classes.forEach(function(name) {
|
|||||||
var file = name.toLowerCase();
|
var file = name.toLowerCase();
|
||||||
widget[name] = widget[file] = require('./widgets/' + file);
|
widget[name] = widget[file] = require('./widgets/' + file);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
widget.aliases = {
|
||||||
|
'ListBar': 'Listbar',
|
||||||
|
'PNG': 'ANSIImage'
|
||||||
|
};
|
||||||
|
|
||||||
|
Object.keys(widget.aliases).forEach(function(key) {
|
||||||
|
var name = widget.aliases[key];
|
||||||
|
widget[key] = widget[name];
|
||||||
|
widget[key.toLowerCase()] = widget[name];
|
||||||
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user