def doCheck(self, view):
        if view.is_scratch() or (view.file_name() and view.file_name().endswith('.js') == False):
            self.busy = False
            return

        view.set_status('NPMInfo', '')
        self.view = view

        reg = view.sel()[0]
        if reg.empty():
            line = view.line(reg)
            line_contents = view.substr(line)
            matchObj = re.match(r'.*require\(([\"\']+)([a-zA-Z0-9\_\-]*)([\"\']+)\).*', line_contents)
            if matchObj:
                npm = matchObj.group(2)
                qt = matchObj.group(1)
                npmStart = (line_contents.find("require(" + qt + npm + qt + ")") + 9)
                npmEnd = npmStart + len(npm) + 1
                col = view.rowcol(reg.b)[1]
                if col >= npmEnd or npmStart < col:
                    self.busy = False
                    return

                dir = view.file_name()
                pkgPath = self.getPackagePath(npm, dir)
                self.pkgGlobal = False
                if pkgPath == False:
                    pkgPath = self.getPackageGlobalPath(npm, dir)
                    if pkgPath != False:
                        self.pkgGlobal = True

                o = self.getInfo(npm, dir, pkgPath)
                self.pkgPath = pkgPath
                self.pkgJson = o
                self.npm = npm

                if 'version' in o:
                    if 'description' in o:
                        desc = o['description']
                    else:
                        desc = "No description found"

                    npmAndVersion = npm + "@" + o['version']
                    if self.pkgGlobal:
                        npmAndVersion += " (global)"
                    view.set_status('NPMInfo', npmAndVersion + " - " + desc)

                    self.quickPanelOptions = [npmAndVersion, 'List properties and methods', 'Open package.json']
                    if 'repository' in o and 'url' in o['repository'] and o['repository']['url'].startswith('http'):
                        self.quickPanelOptions += ['Open repo in browser']

                    if self.showQuickPanel:
                        view.window().show_quick_panel(self.quickPanelOptions, self.quickPanelSelect)

                else:
                    view.set_status('NPMInfo', 'No package.json found for "' + npm + '"')

        self.busy = False
dataset/ETHPy150Open dsteinbach/npm-info/NPMInfo.py/NPMInfoEvents.doCheck/swapped operands of `<`