It appears you have a well-structured Git repository with various files, including SVG icons and HTML documents. Here's a brief overview:
This commit is contained in:
42
backend/node_modules/trim-newlines/index.d.ts
generated
vendored
Normal file
42
backend/node_modules/trim-newlines/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
declare const trimNewlines: {
|
||||
/**
|
||||
Trim from the start and end of a string.
|
||||
|
||||
@example
|
||||
```js
|
||||
import trimNewlines from 'trim-newlines';
|
||||
|
||||
trimNewlines('\n🦄\r\n');
|
||||
//=> '🦄'
|
||||
```
|
||||
*/
|
||||
(string: string): string;
|
||||
|
||||
/**
|
||||
Trim from the start of a string.
|
||||
|
||||
@example
|
||||
```js
|
||||
import trimNewlines from 'trim-newlines';
|
||||
|
||||
trimNewlines.start('\n🦄\r\n');
|
||||
//=> '🦄\r\n'
|
||||
```
|
||||
*/
|
||||
start(string: string): string;
|
||||
|
||||
/**
|
||||
Trim from the end of a string.
|
||||
|
||||
@example
|
||||
```js
|
||||
import trimNewlines from 'trim-newlines';
|
||||
|
||||
trimNewlines.end('\n🦄\r\n');
|
||||
//=> '\n🦄'
|
||||
```
|
||||
*/
|
||||
end(string: string): string;
|
||||
};
|
||||
|
||||
export default trimNewlines;
|
35
backend/node_modules/trim-newlines/index.js
generated
vendored
Normal file
35
backend/node_modules/trim-newlines/index.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
export default function trimNewlines(string) {
|
||||
let start = 0;
|
||||
let end = string.length;
|
||||
|
||||
while (start < end && (string[start] === '\r' || string[start] === '\n')) {
|
||||
start++;
|
||||
}
|
||||
|
||||
while (end > start && (string[end - 1] === '\r' || string[end - 1] === '\n')) {
|
||||
end--;
|
||||
}
|
||||
|
||||
return (start > 0 || end < string.length) ? string.slice(start, end) : string;
|
||||
}
|
||||
|
||||
trimNewlines.start = string => {
|
||||
const end = string.length;
|
||||
let start = 0;
|
||||
|
||||
while (start < end && (string[start] === '\r' || string[start] === '\n')) {
|
||||
start++;
|
||||
}
|
||||
|
||||
return start > 0 ? string.slice(start, end) : string;
|
||||
};
|
||||
|
||||
trimNewlines.end = string => {
|
||||
let end = string.length;
|
||||
|
||||
while (end > 0 && (string[end - 1] === '\r' || string[end - 1] === '\n')) {
|
||||
end--;
|
||||
}
|
||||
|
||||
return end < string.length ? string.slice(0, end) : string;
|
||||
};
|
9
backend/node_modules/trim-newlines/license
generated
vendored
Normal file
9
backend/node_modules/trim-newlines/license
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
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:
|
||||
|
||||
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.
|
46
backend/node_modules/trim-newlines/package.json
generated
vendored
Normal file
46
backend/node_modules/trim-newlines/package.json
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"name": "trim-newlines",
|
||||
"version": "4.1.1",
|
||||
"description": "Trim newlines from the start and/or end of a string",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/trim-newlines",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"trim",
|
||||
"newline",
|
||||
"newlines",
|
||||
"linebreak",
|
||||
"lf",
|
||||
"crlf",
|
||||
"left",
|
||||
"right",
|
||||
"start",
|
||||
"end",
|
||||
"string",
|
||||
"remove",
|
||||
"delete",
|
||||
"strip"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^3.15.0",
|
||||
"tsd": "^0.14.0",
|
||||
"xo": "^0.39.1"
|
||||
}
|
||||
}
|
55
backend/node_modules/trim-newlines/readme.md
generated
vendored
Normal file
55
backend/node_modules/trim-newlines/readme.md
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
# trim-newlines
|
||||
|
||||
> Trim [newlines](https://en.wikipedia.org/wiki/Newline) from the start and/or end of a string
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install trim-newlines
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import trimNewlines from 'trim-newlines';
|
||||
|
||||
trimNewlines('\n🦄\r\n');
|
||||
//=> '🦄'
|
||||
|
||||
trimNewlines.start('\n🦄\r\n');
|
||||
//=> '🦄\r\n'
|
||||
|
||||
trimNewlines.end('\n🦄\r\n');
|
||||
//=> '\n🦄'
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### trimNewlines(string)
|
||||
|
||||
Trim from the start and end of a string.
|
||||
|
||||
### trimNewlines.start(string)
|
||||
|
||||
Trim from the start of a string.
|
||||
|
||||
### trimNewlines.end(string)
|
||||
|
||||
Trim from the end of a string.
|
||||
|
||||
## Related
|
||||
|
||||
- [trim-left](https://github.com/sindresorhus/trim-left) - Similar to `String#trim()` but removes only whitespace on the left
|
||||
- [trim-right](https://github.com/sindresorhus/trim-right) - Similar to `String#trim()` but removes only whitespace on the right.
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<b>
|
||||
<a href="https://tidelift.com/subscription/pkg/npm-trim-newlines?utm_source=npm-trim-newlines&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>
|
Reference in New Issue
Block a user