"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/first-mate/lib/scope-selector.js" (7 Feb 2017, 916 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 (function() {
    2   var ScopeSelector, ScopeSelectorParser;
    3 
    4   ScopeSelectorParser = require('./scope-selector-parser');
    5 
    6   module.exports = ScopeSelector = (function() {
    7     function ScopeSelector(source) {
    8       this.matcher = ScopeSelectorParser.parse(source);
    9     }
   10 
   11     ScopeSelector.prototype.matches = function(scopes) {
   12       if (typeof scopes === 'string') {
   13         scopes = [scopes];
   14       }
   15       return this.matcher.matches(scopes);
   16     };
   17 
   18     ScopeSelector.prototype.getPrefix = function(scopes) {
   19       if (typeof scopes === 'string') {
   20         scopes = [scopes];
   21       }
   22       return this.matcher.getPrefix(scopes);
   23     };
   24 
   25     ScopeSelector.prototype.toCssSelector = function() {
   26       return this.matcher.toCssSelector();
   27     };
   28 
   29     ScopeSelector.prototype.toCssSyntaxSelector = function() {
   30       return this.matcher.toCssSyntaxSelector();
   31     };
   32 
   33     return ScopeSelector;
   34 
   35   })();
   36 
   37 }).call(this);