mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-02 06:02:19 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
11
web/node_modules/clsx/clsx.d.ts
generated
vendored
Normal file
11
web/node_modules/clsx/clsx.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
export type ClassValue = ClassArray | ClassDictionary | string | number | null | boolean | undefined;
|
||||
|
||||
export interface ClassDictionary {
|
||||
[id: string]: any;
|
||||
}
|
||||
|
||||
export interface ClassArray extends Array<ClassValue> { }
|
||||
|
||||
declare const clsx: (...classes: ClassValue[]) => string;
|
||||
|
||||
export default clsx;
|
40
web/node_modules/clsx/dist/clsx.js
generated
vendored
Normal file
40
web/node_modules/clsx/dist/clsx.js
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
function toVal(mix) {
|
||||
var k, y, str='';
|
||||
|
||||
if (typeof mix === 'string' || typeof mix === 'number') {
|
||||
str += mix;
|
||||
} else if (typeof mix === 'object') {
|
||||
if (Array.isArray(mix)) {
|
||||
for (k=0; k < mix.length; k++) {
|
||||
if (mix[k]) {
|
||||
if (y = toVal(mix[k])) {
|
||||
str && (str += ' ');
|
||||
str += y;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (k in mix) {
|
||||
if (mix[k]) {
|
||||
str && (str += ' ');
|
||||
str += k;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
module.exports = function () {
|
||||
var i=0, tmp, x, str='';
|
||||
while (i < arguments.length) {
|
||||
if (tmp = arguments[i++]) {
|
||||
if (x = toVal(tmp)) {
|
||||
str && (str += ' ');
|
||||
str += x
|
||||
}
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
40
web/node_modules/clsx/dist/clsx.m.js
generated
vendored
Normal file
40
web/node_modules/clsx/dist/clsx.m.js
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
function toVal(mix) {
|
||||
var k, y, str='';
|
||||
|
||||
if (typeof mix === 'string' || typeof mix === 'number') {
|
||||
str += mix;
|
||||
} else if (typeof mix === 'object') {
|
||||
if (Array.isArray(mix)) {
|
||||
for (k=0; k < mix.length; k++) {
|
||||
if (mix[k]) {
|
||||
if (y = toVal(mix[k])) {
|
||||
str && (str += ' ');
|
||||
str += y;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (k in mix) {
|
||||
if (mix[k]) {
|
||||
str && (str += ' ');
|
||||
str += k;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
export default function () {
|
||||
var i=0, tmp, x, str='';
|
||||
while (i < arguments.length) {
|
||||
if (tmp = arguments[i++]) {
|
||||
if (x = toVal(tmp)) {
|
||||
str && (str += ' ');
|
||||
str += x
|
||||
}
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
1
web/node_modules/clsx/dist/clsx.min.js
generated
vendored
Normal file
1
web/node_modules/clsx/dist/clsx.min.js
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.clsx=n()}(this,(function(){function e(n){var t,f,o="";if("string"==typeof n||"number"==typeof n)o+=n;else if("object"==typeof n)if(Array.isArray(n))for(t=0;t<n.length;t++)n[t]&&(f=e(n[t]))&&(o&&(o+=" "),o+=f);else for(t in n)n[t]&&(o&&(o+=" "),o+=t);return o}return function(){for(var n,t,f=0,o="";f<arguments.length;)(n=arguments[f++])&&(t=e(n))&&(o&&(o+=" "),o+=t);return o}}));
|
9
web/node_modules/clsx/license
generated
vendored
Normal file
9
web/node_modules/clsx/license
generated
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.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.
|
39
web/node_modules/clsx/package.json
generated
vendored
Normal file
39
web/node_modules/clsx/package.json
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"name": "clsx",
|
||||
"version": "1.1.1",
|
||||
"repository": "lukeed/clsx",
|
||||
"description": "A tiny (228B) utility for constructing className strings conditionally.",
|
||||
"module": "dist/clsx.m.js",
|
||||
"unpkg": "dist/clsx.min.js",
|
||||
"main": "dist/clsx.js",
|
||||
"types": "clsx.d.ts",
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "Luke Edwards",
|
||||
"email": "luke.edwards05@gmail.com",
|
||||
"url": "https://lukeed.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "bundt",
|
||||
"pretest": "npm run build",
|
||||
"test": "tape -r esm test/*.js | tap-spec"
|
||||
},
|
||||
"files": [
|
||||
"*.d.ts",
|
||||
"dist"
|
||||
],
|
||||
"keywords": [
|
||||
"classes",
|
||||
"classname",
|
||||
"classnames"
|
||||
],
|
||||
"devDependencies": {
|
||||
"bundt": "1.0.1",
|
||||
"esm": "3.2.25",
|
||||
"tap-spec": "5.0.0",
|
||||
"tape": "4.9.1"
|
||||
}
|
||||
}
|
86
web/node_modules/clsx/readme.md
generated
vendored
Normal file
86
web/node_modules/clsx/readme.md
generated
vendored
Normal file
|
@ -0,0 +1,86 @@
|
|||
# clsx [](https://github.com/lukeed/clsx/actions?query=workflow%3ACI) [](https://codecov.io/gh/lukeed/clsx)
|
||||
|
||||
> A tiny (228B) utility for constructing `className` strings conditionally.<Br>Also serves as a [faster](/bench) & smaller drop-in replacement for the `classnames` module.
|
||||
|
||||
This module is available in three formats:
|
||||
|
||||
* **ES Module**: `dist/clsx.m.js`
|
||||
* **CommonJS**: `dist/clsx.js`
|
||||
* **UMD**: `dist/clsx.min.js`
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save clsx
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import clsx from 'clsx';
|
||||
|
||||
// Strings (variadic)
|
||||
clsx('foo', true && 'bar', 'baz');
|
||||
//=> 'foo bar baz'
|
||||
|
||||
// Objects
|
||||
clsx({ foo:true, bar:false, baz:isTrue() });
|
||||
//=> 'foo baz'
|
||||
|
||||
// Objects (variadic)
|
||||
clsx({ foo:true }, { bar:false }, null, { '--foobar':'hello' });
|
||||
//=> 'foo --foobar'
|
||||
|
||||
// Arrays
|
||||
clsx(['foo', 0, false, 'bar']);
|
||||
//=> 'foo bar'
|
||||
|
||||
// Arrays (variadic)
|
||||
clsx(['foo'], ['', 0, false, 'bar'], [['baz', [['hello'], 'there']]]);
|
||||
//=> 'foo bar baz hello there'
|
||||
|
||||
// Kitchen sink (with nesting)
|
||||
clsx('foo', [1 && 'bar', { baz:false, bat:null }, ['hello', ['world']]], 'cya');
|
||||
//=> 'foo bar hello world cya'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### clsx(...input)
|
||||
Returns: `String`
|
||||
|
||||
#### input
|
||||
Type: `Mixed`
|
||||
|
||||
The `clsx` function can take ***any*** number of arguments, each of which can be an Object, Array, Boolean, or String.
|
||||
|
||||
> **Important:** _Any_ falsey values are discarded!<br>Standalone Boolean values are discarded as well.
|
||||
|
||||
```js
|
||||
clsx(true, false, '', null, undefined, 0, NaN);
|
||||
//=> ''
|
||||
```
|
||||
|
||||
## Benchmarks
|
||||
|
||||
For snapshots of cross-browser results, check out the [`bench`](/bench) directory~!
|
||||
|
||||
## Support
|
||||
|
||||
All versions of Node.js are supported.
|
||||
|
||||
All browsers that support [`Array.isArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#Browser_compatibility) are supported (IE9+).
|
||||
|
||||
>**Note:** For IE8 support and older, please install `clsx@1.0.x` and beware of [#17](https://github.com/lukeed/clsx/issues/17).
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [obj-str](https://github.com/lukeed/obj-str) - A smaller (96B) and similiar utility that only works with Objects.
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Luke Edwards](https://lukeed.com)
|
Loading…
Add table
Add a link
Reference in a new issue