|
Download .opencode/node_modules/shebang-regex/readme.md from Chenloong999/opencode-data: direct link, hf CLI and curl.
- Browser
- Download file 649 Bytes
-
https://huggingface.co/datasets/Chenloong999/opencode-data/resolve/main/.opencode/node_modules/shebang-regex/readme.md
- Command line
-
hf download hf://datasets/Chenloong999/opencode-data/.opencode/node_modules/shebang-regex/readme.md
-
curl -L -o readme.md https://huggingface.co/datasets/Chenloong999/opencode-data/resolve/main/.opencode/node_modules/shebang-regex/readme.md
649 Bytes
| # shebang-regex [](https://travis-ci.org/sindresorhus/shebang-regex) | |
| > Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) line | |
| ## Install | |
| ``` | |
| $ npm install shebang-regex | |
| ``` | |
| ## Usage | |
| ```js | |
| const shebangRegex = require('shebang-regex'); | |
| const string = '#!/usr/bin/env node\nconsole.log("unicorns");'; | |
| shebangRegex.test(string); | |
| //=> true | |
| shebangRegex.exec(string)[0]; | |
| //=> '#!/usr/bin/env node' | |
| shebangRegex.exec(string)[1]; | |
| //=> '/usr/bin/env node' | |
| ``` | |
| ## License | |
| MIT © [Sindre Sorhus](https://sindresorhus.com) | |