diff --git a/lib/tput.js b/lib/tput.js index 06e48ae..ba6cec3 100644 --- a/lib/tput.js +++ b/lib/tput.js @@ -837,54 +837,6 @@ Tput.prototype.parseTermCap = function(data) { return terms; }; -Tput.prototype.parseTermCap_ = function(data) { - var terms = {} - , term; - - // remove escaped newlines - data = data.replace(/\\\n\s*/g, ''); - - // remove comments - data = data.replace(/^#[^\n]+/gm, ''); - - // could split by line instead - data = data.replace(/\s+/g, ''); - - var fields = data.split(/:+/) - , l = fields.length - , i = 0 - , field - , names; - - for (; i < l; i++) { - field = fields[i].trim(); - if (!field) continue; - - names = field.split('|'); - if (names.length > 1) { - term = terms[names[0]] = {}; - term.header = { - desc: names.pop(), - names: names - }; - term.bools = {}; - term.numbers = {}; - term.strings = {}; - continue; - } - - if (~field.indexOf('=')) { - parts = field.split('='); - term.strings[parts[0]] = parts.slice(1).join('='); - } else if (~field.indexOf('#')) { - parts = field.split('#'); - term.numbers[parts[0]] = +parts.slice(1).join('#'); - } else { - term.bools[field] = true; - } - } -}; - /** * Termcap Compiler * man termcap