lib/index.js
function getTagInfo(buff) {
    let robj = {};
    let pos = 0;
    let bi = -1;
    let ckey = '';
    let cinfo = '';

    do{
        bi = buff.indexOf('//<--', pos);
        if (bi >= 0) {
            let kbi = buff.indexOf(' Begin', bi);
            if (kbi < 0) {
                return robj;
            }

            ckey = buff.substr(bi, kbi - bi);

            let ei = buff.indexOf('//<--' + ckey + ' End', kbi);
            if (ei < 0) {
                return robj;
            }

            cinfo = buff.substr(kbi + 6, ei - kbi - 6);

            robj[ckey] = cinfo;

            pos = kbi + 5 + ckey.length + 4;
        }
    }while(bi >= 0);

    return robj;
}
function getTagInfo(buff) {
    let robj = {};
    let pos = 0;
    let bi = -1;
    let ckey = '';
    let cinfo = '';

    do{
        bi = buff.indexOf('//<--', pos);
        if (bi >= 0) {
            let kbi = buff.indexOf(' Begin', bi);
            if (kbi < 0) {
                return robj;
            }

            ckey = buff.substr(bi, kbi - bi);

            let ei = buff.indexOf('//<--' + ckey + ' End', kbi);
            if (ei < 0) {
                return robj;
            }

            cinfo = buff.substr(kbi + 6, ei - kbi - 6);

            robj[ckey] = cinfo;

            pos = kbi + 5 + ckey.length + 4;
        }
    }while(bi >= 0);

    return robj;
}
{tagname: str}