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:
59
backend/node_modules/decamelize/index.d.ts
generated
vendored
Normal file
59
backend/node_modules/decamelize/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
declare namespace decamelize {
|
||||
interface Options {
|
||||
/**
|
||||
Character or string inserted to separate words in `string`.
|
||||
|
||||
@default '_'
|
||||
|
||||
@example
|
||||
```
|
||||
import decamelize = require('decamelize');
|
||||
|
||||
decamelize('unicornRainbow');
|
||||
//=> 'unicorn_rainbow'
|
||||
|
||||
decamelize('unicornRainbow', {separator: '-'});
|
||||
//=> 'unicorn-rainbow'
|
||||
```
|
||||
*/
|
||||
readonly separator?: string;
|
||||
|
||||
/**
|
||||
Preserve sequences of uppercase characters.
|
||||
|
||||
@default false
|
||||
|
||||
@example
|
||||
```
|
||||
import decamelize = require('decamelize');
|
||||
|
||||
decamelize('testGUILabel');
|
||||
//=> 'test_gui_label'
|
||||
|
||||
decamelize('testGUILabel', {preserveConsecutiveUppercase: true});
|
||||
//=> 'test_GUI_label'
|
||||
```
|
||||
*/
|
||||
readonly preserveConsecutiveUppercase?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Convert a camelized string into a lowercased one with a custom separator: `unicornRainbow` → `unicorn_rainbow`.
|
||||
|
||||
@param string - The camelcase string to decamelize.
|
||||
|
||||
@example
|
||||
```
|
||||
import decamelize = require('decamelize');
|
||||
|
||||
decamelize('unicornRainbow');
|
||||
//=> 'unicorn_rainbow'
|
||||
|
||||
decamelize('unicornRainbow', {separator: '-'});
|
||||
//=> 'unicorn-rainbow'
|
||||
```
|
||||
*/
|
||||
declare function decamelize(string: string, options?: decamelize.Options): string;
|
||||
|
||||
export = decamelize;
|
65
backend/node_modules/decamelize/index.js
generated
vendored
Normal file
65
backend/node_modules/decamelize/index.js
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
'use strict';
|
||||
|
||||
const handlePreserveConsecutiveUppercase = (decamelized, separator) => {
|
||||
// Lowercase all single uppercase characters. As we
|
||||
// want to preserve uppercase sequences, we cannot
|
||||
// simply lowercase the separated string at the end.
|
||||
// `data_For_USACounties` → `data_for_USACounties`
|
||||
decamelized = decamelized.replace(
|
||||
/((?<![\p{Uppercase_Letter}\d])[\p{Uppercase_Letter}\d](?![\p{Uppercase_Letter}\d]))/gu,
|
||||
$0 => {
|
||||
return $0.toLowerCase();
|
||||
}
|
||||
);
|
||||
|
||||
// Remaining uppercase sequences will be separated from lowercase sequences.
|
||||
// `data_For_USACounties` → `data_for_USA_counties`
|
||||
return decamelized.replace(
|
||||
/(\p{Uppercase_Letter}+)(\p{Uppercase_Letter}\p{Lowercase_Letter}+)/gu,
|
||||
(_, $1, $2) => {
|
||||
return $1 + separator + $2.toLowerCase();
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
module.exports = (
|
||||
text,
|
||||
{
|
||||
separator = '_',
|
||||
preserveConsecutiveUppercase = false
|
||||
} = {}
|
||||
) => {
|
||||
if (!(typeof text === 'string' && typeof separator === 'string')) {
|
||||
throw new TypeError(
|
||||
'The `text` and `separator` arguments should be of type `string`'
|
||||
);
|
||||
}
|
||||
|
||||
// Checking the second character is done later on. Therefore process shorter strings here.
|
||||
if (text.length < 2) {
|
||||
return preserveConsecutiveUppercase ? text : text.toLowerCase();
|
||||
}
|
||||
|
||||
const replacement = `$1${separator}$2`;
|
||||
|
||||
// Split lowercase sequences followed by uppercase character.
|
||||
// `dataForUSACounties` → `data_For_USACounties`
|
||||
// `myURLstring → `my_URLstring`
|
||||
const decamelized = text.replace(
|
||||
/([\p{Lowercase_Letter}\d])(\p{Uppercase_Letter})/gu,
|
||||
replacement
|
||||
);
|
||||
|
||||
if (preserveConsecutiveUppercase) {
|
||||
return handlePreserveConsecutiveUppercase(decamelized, separator);
|
||||
}
|
||||
|
||||
// Split multiple uppercase characters followed by one or more lowercase characters.
|
||||
// `my_URLstring` → `my_url_string`
|
||||
return decamelized
|
||||
.replace(
|
||||
/(\p{Uppercase_Letter})(\p{Uppercase_Letter}\p{Lowercase_Letter}+)/gu,
|
||||
replacement
|
||||
)
|
||||
.toLowerCase();
|
||||
};
|
9
backend/node_modules/decamelize/license
generated
vendored
Normal file
9
backend/node_modules/decamelize/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.
|
40
backend/node_modules/decamelize/package.json
generated
vendored
Normal file
40
backend/node_modules/decamelize/package.json
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "decamelize",
|
||||
"version": "5.0.1",
|
||||
"description": "Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/decamelize",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"decamelize",
|
||||
"decamelcase",
|
||||
"camelcase",
|
||||
"lowercase",
|
||||
"case",
|
||||
"dash",
|
||||
"hyphen",
|
||||
"string",
|
||||
"text",
|
||||
"convert"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^2.4.0",
|
||||
"tsd": "^0.11.0",
|
||||
"xo": "^0.24.0"
|
||||
}
|
||||
}
|
92
backend/node_modules/decamelize/readme.md
generated
vendored
Normal file
92
backend/node_modules/decamelize/readme.md
generated
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
# decamelize
|
||||
|
||||
> Convert a camelized string into a lowercased one with a custom separator\
|
||||
> Example: `unicornRainbow` → `unicorn_rainbow`
|
||||
|
||||
If you use this on untrusted user input, don't forget to limit the length to something reasonable.
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install decamelize
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const decamelize = require('decamelize');
|
||||
|
||||
decamelize('unicornRainbow');
|
||||
//=> 'unicorn_rainbow'
|
||||
|
||||
decamelize('unicornRainbow', {separator: '-'});
|
||||
//=> 'unicorn-rainbow'
|
||||
|
||||
decamelize('testGUILabel', {preserveConsecutiveUppercase: true});
|
||||
//=> 'test_GUI_label'
|
||||
|
||||
decamelize('testGUILabel', {preserveConsecutiveUppercase: false});
|
||||
//=> 'test_gui_label'
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### decamelize(input, options?)
|
||||
|
||||
#### input
|
||||
|
||||
Type: `string`
|
||||
|
||||
#### options
|
||||
|
||||
Type: `object`
|
||||
|
||||
##### separator
|
||||
|
||||
Type: `string`\
|
||||
Default: `'_'`
|
||||
|
||||
Character or string inserted to separate words in `string`.
|
||||
|
||||
```js
|
||||
cosnt decamelize = require('decamelize');
|
||||
|
||||
decamelize('unicornRainbow');
|
||||
//=> 'unicorn_rainbow'
|
||||
|
||||
decamelize('unicornRainbow', {separator: '-'});
|
||||
//=> 'unicorn-rainbow'
|
||||
```
|
||||
|
||||
##### preserveConsecutiveUppercase
|
||||
|
||||
Type: `boolean`\
|
||||
Default: `false`
|
||||
|
||||
Preserve sequences of uppercase characters.
|
||||
|
||||
```js
|
||||
const decamelize = require('decamelize');
|
||||
|
||||
decamelize('testGUILabel');
|
||||
//=> 'test_gui_label'
|
||||
|
||||
decamelize('testGUILabel', {preserveConsecutiveUppercase: true});
|
||||
//=> 'test_GUI_label'
|
||||
```
|
||||
|
||||
## Related
|
||||
|
||||
See [`camelcase`](https://github.com/sindresorhus/camelcase) for the inverse.
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<b>
|
||||
<a href="https://tidelift.com/subscription/pkg/npm-decamelize?utm_source=npm-decamelize&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