pax_global_header00006660000000000000000000000064126303407420014513gustar00rootroot0000000000000052 comment=62d96ada2264e959e28874b486de85a9593c69ae shebang-regex-2.0.0/000077500000000000000000000000001263034074200142315ustar00rootroot00000000000000shebang-regex-2.0.0/.editorconfig000066400000000000000000000003471263034074200167120ustar00rootroot00000000000000root = true [*] indent_style = tab end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [{package.json,*.yml}] indent_style = space indent_size = 2 [*.md] trim_trailing_whitespace = false shebang-regex-2.0.0/.gitattributes000066400000000000000000000000141263034074200171170ustar00rootroot00000000000000* text=auto shebang-regex-2.0.0/.gitignore000066400000000000000000000000151263034074200162150ustar00rootroot00000000000000node_modules shebang-regex-2.0.0/.travis.yml000066400000000000000000000001121263034074200163340ustar00rootroot00000000000000sudo: false language: node_js node_js: - 'stable' - '0.12' - '0.10' shebang-regex-2.0.0/index.js000066400000000000000000000000521263034074200156730ustar00rootroot00000000000000'use strict'; module.exports = /^#!(.*)/; shebang-regex-2.0.0/license000066400000000000000000000021371263034074200156010ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) Sindre Sorhus (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. shebang-regex-2.0.0/package.json000066400000000000000000000011151263034074200165150ustar00rootroot00000000000000{ "name": "shebang-regex", "version": "2.0.0", "description": "Regular expression for matching a shebang line", "license": "MIT", "repository": "sindresorhus/shebang-regex", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "engines": { "node": ">=0.10.0" }, "scripts": { "test": "xo && ava" }, "files": [ "index.js" ], "keywords": [ "re", "regex", "regexp", "shebang", "match", "test", "line" ], "devDependencies": { "ava": "*", "xo": "*" } } shebang-regex-2.0.0/readme.md000066400000000000000000000011151263034074200160060ustar00rootroot00000000000000# shebang-regex [![Build Status](https://travis-ci.org/sindresorhus/shebang-regex.svg?branch=master)](https://travis-ci.org/sindresorhus/shebang-regex) > Regular expression for matching a [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) line ## Install ``` $ npm install --save shebang-regex ``` ## Usage ```js const shebangRegex = require('shebang-regex'); const str = '#!/usr/bin/env node\nconsole.log("unicorns");'; shebangRegex.test(str); //=> true shebangRegex.exec(str)[0]; //=> '#!/usr/bin/env node' ``` ## License MIT © [Sindre Sorhus](http://sindresorhus.com) shebang-regex-2.0.0/test.js000066400000000000000000000002751263034074200155520ustar00rootroot00000000000000import test from 'ava'; import x from './'; test(t => { t.true(x.test('#!/usr/bin/env node\nconsole.log("unicorns");')); t.is(x.exec('#!/usr/bin/env node')[1], '/usr/bin/env node'); });