How to use first-mate - 3 common examples

To help you get started, we’ve selected a few first-mate examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github manaflair / mylittledom / sources / extra / SyntaxHighlighter.js View on Github external
constructor() {

        super();

        // I don't really like this interface, so we wrap it and expose a new one
        let grammarRegistry = new GrammarRegistry();

        this.colorCache = new Map();

        this.rawLines = [ `` ];
        this.tokenizedLines = [ ];

        this.grammar = {

            active: null,

            registry: new Map(),

            load: (name, data) => {

                if (isString(data) || data instanceof Buffer)
                    data = JSON.parse(data.toString());
github atom / atom / src / grammar-registry.js View on Github external
constructor ({config} = {}) {
    this.config = config
    this.subscriptions = new CompositeDisposable()
    this.textmateRegistry = new FirstMate.GrammarRegistry({maxTokensPerLine: 100, maxLineLength: 1000})
    this.clear()
  }

first-mate

TextMate helpers

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis

Popular first-mate functions