Ajout du choix des utilisateurs sur un événement. Ajout de fichiers dans un événement. (dropzone cassée)
This commit is contained in:
38
em2rp/node_modules/arrify/index.d.ts
generated
vendored
Normal file
38
em2rp/node_modules/arrify/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
/**
|
||||
Convert a value to an array.
|
||||
|
||||
_Supplying `null` or `undefined` results in an empty array._
|
||||
|
||||
@example
|
||||
```
|
||||
import arrify = require('arrify');
|
||||
|
||||
arrify('🦄');
|
||||
//=> ['🦄']
|
||||
|
||||
arrify(['🦄']);
|
||||
//=> ['🦄']
|
||||
|
||||
arrify(new Set(['🦄']));
|
||||
//=> ['🦄']
|
||||
|
||||
arrify(null);
|
||||
//=> []
|
||||
|
||||
arrify(undefined);
|
||||
//=> []
|
||||
```
|
||||
*/
|
||||
declare function arrify<ValueType>(
|
||||
value: ValueType
|
||||
): ValueType extends (null | undefined)
|
||||
? []
|
||||
: ValueType extends string
|
||||
? [string]
|
||||
: ValueType extends ReadonlyArray<unknown> // TODO: Use 'readonly unknown[]' in the next major version
|
||||
? ValueType
|
||||
: ValueType extends Iterable<infer T>
|
||||
? T[]
|
||||
: [ValueType];
|
||||
|
||||
export = arrify;
|
23
em2rp/node_modules/arrify/index.js
generated
vendored
Normal file
23
em2rp/node_modules/arrify/index.js
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
const arrify = value => {
|
||||
if (value === null || value === undefined) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (Array.isArray(value)) {
|
||||
return value;
|
||||
}
|
||||
|
||||
if (typeof value === 'string') {
|
||||
return [value];
|
||||
}
|
||||
|
||||
if (typeof value[Symbol.iterator] === 'function') {
|
||||
return [...value];
|
||||
}
|
||||
|
||||
return [value];
|
||||
};
|
||||
|
||||
module.exports = arrify;
|
9
em2rp/node_modules/arrify/license
generated
vendored
Normal file
9
em2rp/node_modules/arrify/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.
|
35
em2rp/node_modules/arrify/package.json
generated
vendored
Normal file
35
em2rp/node_modules/arrify/package.json
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "arrify",
|
||||
"version": "2.0.1",
|
||||
"description": "Convert a value to an array",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/arrify",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"array",
|
||||
"arrify",
|
||||
"arrayify",
|
||||
"convert",
|
||||
"value",
|
||||
"ensure"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
}
|
||||
}
|
39
em2rp/node_modules/arrify/readme.md
generated
vendored
Normal file
39
em2rp/node_modules/arrify/readme.md
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
# arrify [](https://travis-ci.org/sindresorhus/arrify)
|
||||
|
||||
> Convert a value to an array
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install arrify
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const arrify = require('arrify');
|
||||
|
||||
arrify('🦄');
|
||||
//=> ['🦄']
|
||||
|
||||
arrify(['🦄']);
|
||||
//=> ['🦄']
|
||||
|
||||
arrify(new Set(['🦄']));
|
||||
//=> ['🦄']
|
||||
|
||||
arrify(null);
|
||||
//=> []
|
||||
|
||||
arrify(undefined);
|
||||
//=> []
|
||||
```
|
||||
|
||||
*Supplying `null` or `undefined` results in an empty array.*
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
Reference in New Issue
Block a user