From 4fa34aa53862ce9a55fdb63554b58e36c3bc46a2 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 17 Jul 2015 03:11:21 -0700 Subject: [PATCH] add widget name aliases. --- lib/widget.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/widget.js b/lib/widget.js index 7e3cd2f..6d1444d 100644 --- a/lib/widget.js +++ b/lib/widget.js @@ -47,3 +47,14 @@ widget.classes.forEach(function(name) { var file = name.toLowerCase(); 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]; +});