mirror of
https://github.com/github/codeql-action.git
synced 2025-12-30 11:10:22 +08:00
Initial commit (from f5274cbdce4ae7c9e4b937dcdf95ac70ae436d5f)
This commit is contained in:
29
node_modules/string-length/index.d.ts
generated
vendored
Normal file
29
node_modules/string-length/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
declare const stringLength: {
|
||||
/**
|
||||
Get the real length of a string - by correctly counting astral symbols and ignoring [ansi escape codes](https://github.com/sindresorhus/strip-ansi).
|
||||
|
||||
`String#length` errornously counts [astral symbols](https://web.archive.org/web/20150721114550/http://www.tlg.uci.edu/~opoudjis/unicode/unicode_astral.html) as two characters.
|
||||
|
||||
@example
|
||||
```
|
||||
import stringLength = require('string-length');
|
||||
|
||||
'🐴'.length;
|
||||
//=> 2
|
||||
|
||||
stringLength('🐴');
|
||||
//=> 1
|
||||
|
||||
stringLength('\u001B[1municorn\u001B[22m');
|
||||
//=> 7
|
||||
```
|
||||
*/
|
||||
(string: string): number;
|
||||
|
||||
// TODO: Remove this for the next major release, refactor the whole definition to:
|
||||
// declare function stringLength(string: string): number;
|
||||
// export = stringLength;
|
||||
default: typeof stringLength;
|
||||
};
|
||||
|
||||
export = stringLength;
|
||||
9
node_modules/string-length/index.js
generated
vendored
Normal file
9
node_modules/string-length/index.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
const stripAnsi = require('strip-ansi');
|
||||
const astralRegex = require('astral-regex');
|
||||
|
||||
const stringLength = string => stripAnsi(string).replace(astralRegex(), ' ').length;
|
||||
|
||||
module.exports = stringLength;
|
||||
// TODO: Remove this for the next major release
|
||||
module.exports.default = stringLength;
|
||||
9
node_modules/string-length/license
generated
vendored
Normal file
9
node_modules/string-length/license
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.
|
||||
15
node_modules/string-length/node_modules/strip-ansi/index.d.ts
generated
vendored
Normal file
15
node_modules/string-length/node_modules/strip-ansi/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string.
|
||||
|
||||
@example
|
||||
```
|
||||
import stripAnsi from 'strip-ansi';
|
||||
|
||||
stripAnsi('\u001B[4mUnicorn\u001B[0m');
|
||||
//=> 'Unicorn'
|
||||
|
||||
stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
|
||||
//=> 'Click'
|
||||
```
|
||||
*/
|
||||
export default function stripAnsi(string: string): string;
|
||||
7
node_modules/string-length/node_modules/strip-ansi/index.js
generated
vendored
Normal file
7
node_modules/string-length/node_modules/strip-ansi/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
'use strict';
|
||||
const ansiRegex = require('ansi-regex');
|
||||
|
||||
const stripAnsi = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string;
|
||||
|
||||
module.exports = stripAnsi;
|
||||
module.exports.default = stripAnsi;
|
||||
9
node_modules/string-length/node_modules/strip-ansi/license
generated
vendored
Normal file
9
node_modules/string-length/node_modules/strip-ansi/license
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.
|
||||
63
node_modules/string-length/node_modules/strip-ansi/package.json
generated
vendored
Normal file
63
node_modules/string-length/node_modules/strip-ansi/package.json
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/chalk/strip-ansi/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"ansi-regex": "^4.1.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Strip ANSI escape codes from a string",
|
||||
"devDependencies": {
|
||||
"ava": "^1.3.1",
|
||||
"tsd-check": "^0.5.0",
|
||||
"xo": "^0.24.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"homepage": "https://github.com/chalk/strip-ansi#readme",
|
||||
"keywords": [
|
||||
"strip",
|
||||
"trim",
|
||||
"remove",
|
||||
"ansi",
|
||||
"styles",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"string",
|
||||
"tty",
|
||||
"escape",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"log",
|
||||
"logging",
|
||||
"command-line",
|
||||
"text"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "strip-ansi",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/chalk/strip-ansi.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd-check"
|
||||
},
|
||||
"version": "5.2.0"
|
||||
}
|
||||
61
node_modules/string-length/node_modules/strip-ansi/readme.md
generated
vendored
Normal file
61
node_modules/string-length/node_modules/strip-ansi/readme.md
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
# strip-ansi [](https://travis-ci.org/chalk/strip-ansi)
|
||||
|
||||
> Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<b>
|
||||
<a href="https://tidelift.com/subscription/pkg/npm-strip-ansi?utm_source=npm-strip-ansi&utm_medium=referral&utm_campaign=readme">Get professional support for 'strip-ansi' with a Tidelift subscription</a>
|
||||
</b>
|
||||
<br>
|
||||
<sub>
|
||||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
||||
</sub>
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install strip-ansi
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const stripAnsi = require('strip-ansi');
|
||||
|
||||
stripAnsi('\u001B[4mUnicorn\u001B[0m');
|
||||
//=> 'Unicorn'
|
||||
|
||||
stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007');
|
||||
//=> 'Click'
|
||||
```
|
||||
|
||||
|
||||
## Security
|
||||
|
||||
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [strip-ansi-cli](https://github.com/chalk/strip-ansi-cli) - CLI for this module
|
||||
- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Streaming version of this module
|
||||
- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
|
||||
- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
|
||||
- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
- [Sindre Sorhus](https://github.com/sindresorhus)
|
||||
- [Josh Junon](https://github.com/qix-)
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
54
node_modules/string-length/package.json
generated
vendored
Normal file
54
node_modules/string-length/package.json
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/string-length/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"astral-regex": "^1.0.0",
|
||||
"strip-ansi": "^5.2.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes",
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.1",
|
||||
"xo": "^0.24.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/string-length#readme",
|
||||
"keywords": [
|
||||
"unicode",
|
||||
"string",
|
||||
"length",
|
||||
"size",
|
||||
"count",
|
||||
"astral",
|
||||
"symbol",
|
||||
"surrogates",
|
||||
"codepoints",
|
||||
"ansi",
|
||||
"escape",
|
||||
"codes"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "string-length",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/string-length.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"version": "3.1.0"
|
||||
}
|
||||
38
node_modules/string-length/readme.md
generated
vendored
Normal file
38
node_modules/string-length/readme.md
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# string-length [](https://travis-ci.org/sindresorhus/string-length)
|
||||
|
||||
> Get the real length of a string - by correctly counting astral symbols and ignoring [ansi escape codes](https://github.com/sindresorhus/strip-ansi)
|
||||
|
||||
`String#length` errornously counts [astral symbols](https://web.archive.org/web/20150721114550/http://www.tlg.uci.edu/~opoudjis/unicode/unicode_astral.html) as two characters.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install string-length
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const stringLength = require('string-length');
|
||||
|
||||
'🐴'.length;
|
||||
//=> 2
|
||||
|
||||
stringLength('🐴');
|
||||
//=> 1
|
||||
|
||||
stringLength('\u001B[1municorn\u001B[22m');
|
||||
//=> 7
|
||||
```
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [string-width](https://github.com/sindresorhus/string-width) - Get visual width of a string
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
Reference in New Issue
Block a user