How to use the shebang-regex.exec function in shebang-regex

To help you get started, we’ve selected a few shebang-regex 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 forivall / tacoscript / packages / comal / src / file / index.js View on Github external
parseShebang() {
    let shebangMatch = shebangRegex.exec(this.code);
    if (shebangMatch) {
      this.shebang = shebangMatch[0];
      this.code = this.code.replace(shebangRegex, "");
    }
  }

shebang-regex

Regular expression for matching a shebang line

MIT
Latest version published 3 years ago

Package Health Score

67 / 100
Full package analysis

Popular shebang-regex functions