Update checked-in dependencies
This commit is contained in:
parent
4fad06f438
commit
40a500c743
4168 changed files with 298222 additions and 374905 deletions
32
node_modules/indent-string/index.d.ts
generated
vendored
32
node_modules/indent-string/index.d.ts
generated
vendored
|
|
@ -1,19 +1,17 @@
|
|||
declare namespace indentString {
|
||||
interface Options {
|
||||
/**
|
||||
The string to use for the indent.
|
||||
export interface Options {
|
||||
/**
|
||||
The string to use for the indent.
|
||||
|
||||
@default ' '
|
||||
*/
|
||||
readonly indent?: string;
|
||||
@default ' '
|
||||
*/
|
||||
readonly indent?: string;
|
||||
|
||||
/**
|
||||
Also indent empty lines.
|
||||
/**
|
||||
Also indent empty lines.
|
||||
|
||||
@default false
|
||||
*/
|
||||
readonly includeEmptyLines?: boolean;
|
||||
}
|
||||
@default false
|
||||
*/
|
||||
readonly includeEmptyLines?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -24,7 +22,7 @@ Indent each line in a string.
|
|||
|
||||
@example
|
||||
```
|
||||
import indentString = require('indent-string');
|
||||
import indentString from 'indent-string';
|
||||
|
||||
indentString('Unicorns\nRainbows', 4);
|
||||
//=> ' Unicorns\n Rainbows'
|
||||
|
|
@ -33,10 +31,8 @@ indentString('Unicorns\nRainbows', 4, {indent: '♥'});
|
|||
//=> '♥♥♥♥Unicorns\n♥♥♥♥Rainbows'
|
||||
```
|
||||
*/
|
||||
declare function indentString(
|
||||
export default function indentString(
|
||||
string: string,
|
||||
count?: number,
|
||||
options?: indentString.Options
|
||||
options?: Options
|
||||
): string;
|
||||
|
||||
export = indentString;
|
||||
|
|
|
|||
29
node_modules/indent-string/index.js
generated
vendored
29
node_modules/indent-string/index.js
generated
vendored
|
|
@ -1,11 +1,8 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = (string, count = 1, options) => {
|
||||
options = {
|
||||
indent: ' ',
|
||||
includeEmptyLines: false,
|
||||
...options
|
||||
};
|
||||
export default function indentString(string, count = 1, options = {}) {
|
||||
const {
|
||||
indent = ' ',
|
||||
includeEmptyLines = false
|
||||
} = options;
|
||||
|
||||
if (typeof string !== 'string') {
|
||||
throw new TypeError(
|
||||
|
|
@ -19,9 +16,15 @@ module.exports = (string, count = 1, options) => {
|
|||
);
|
||||
}
|
||||
|
||||
if (typeof options.indent !== 'string') {
|
||||
if (count < 0) {
|
||||
throw new RangeError(
|
||||
`Expected \`count\` to be at least 0, got \`${count}\``
|
||||
);
|
||||
}
|
||||
|
||||
if (typeof indent !== 'string') {
|
||||
throw new TypeError(
|
||||
`Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\``
|
||||
`Expected \`options.indent\` to be a \`string\`, got \`${typeof indent}\``
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -29,7 +32,7 @@ module.exports = (string, count = 1, options) => {
|
|||
return string;
|
||||
}
|
||||
|
||||
const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
|
||||
const regex = includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
|
||||
|
||||
return string.replace(regex, options.indent.repeat(count));
|
||||
};
|
||||
return string.replace(regex, indent.repeat(count));
|
||||
}
|
||||
|
|
|
|||
2
node_modules/indent-string/license
generated
vendored
2
node_modules/indent-string/license
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://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:
|
||||
|
||||
|
|
|
|||
15
node_modules/indent-string/package.json
generated
vendored
15
node_modules/indent-string/package.json
generated
vendored
|
|
@ -1,16 +1,19 @@
|
|||
{
|
||||
"name": "indent-string",
|
||||
"version": "4.0.0",
|
||||
"version": "5.0.0",
|
||||
"description": "Indent each line in a string",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/indent-string",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
"node": ">=12"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
|
|
@ -30,8 +33,8 @@
|
|||
"every"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
"ava": "^3.15.0",
|
||||
"tsd": "^0.14.0",
|
||||
"xo": "^0.38.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
29
node_modules/indent-string/readme.md
generated
vendored
29
node_modules/indent-string/readme.md
generated
vendored
|
|
@ -1,19 +1,17 @@
|
|||
# indent-string [](https://travis-ci.org/sindresorhus/indent-string)
|
||||
# indent-string
|
||||
|
||||
> Indent each line in a string
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install indent-string
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const indentString = require('indent-string');
|
||||
import indentString from 'indent-string';
|
||||
|
||||
indentString('Unicorns\nRainbows', 4);
|
||||
//=> ' Unicorns\n Rainbows'
|
||||
|
|
@ -22,10 +20,9 @@ indentString('Unicorns\nRainbows', 4, {indent: '♥'});
|
|||
//=> '♥♥♥♥Unicorns\n♥♥♥♥Rainbows'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### indentString(string, [count], [options])
|
||||
### indentString(string, count?, options?)
|
||||
|
||||
#### string
|
||||
|
||||
|
|
@ -35,7 +32,7 @@ The string to indent.
|
|||
|
||||
#### count
|
||||
|
||||
Type: `number`<br>
|
||||
Type: `number`\
|
||||
Default: `1`
|
||||
|
||||
How many times you want `options.indent` repeated.
|
||||
|
|
@ -46,25 +43,31 @@ Type: `object`
|
|||
|
||||
##### indent
|
||||
|
||||
Type: `string`<br>
|
||||
Type: `string`\
|
||||
Default: `' '`
|
||||
|
||||
The string to use for the indent.
|
||||
|
||||
##### includeEmptyLines
|
||||
|
||||
Type: `boolean`<br>
|
||||
Type: `boolean`\
|
||||
Default: `false`
|
||||
|
||||
Also indent empty lines.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [indent-string-cli](https://github.com/sindresorhus/indent-string-cli) - CLI for this module
|
||||
- [strip-indent](https://github.com/sindresorhus/strip-indent) - Strip leading whitespace from every line in a string
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
<div align="center">
|
||||
<b>
|
||||
<a href="https://tidelift.com/subscription/pkg/npm-indent-string?utm_source=npm-indent-string&utm_medium=referral&utm_campaign=readme">Get professional support for this package 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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue