node_modules ignore

This commit is contained in:
2025-05-08 23:43:47 +02:00
parent e19d52f172
commit 4574544c9f
65041 changed files with 10593536 additions and 0 deletions

8
server/node_modules/nanoclone/.eslintrc.js generated vendored Normal file
View File

@@ -0,0 +1,8 @@
module.exports = {
"extends": "standard",
"env": {
"node": true,
"jest": true
}
};

6
server/node_modules/nanoclone/.size-limit generated vendored Normal file
View File

@@ -0,0 +1,6 @@
[
{
"path": "index.js",
"limit": "300 B"
}
]

6
server/node_modules/nanoclone/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,6 @@
language: node_js
cache: npm
node_js:
- stable
- '8'
- '6'

21
server/node_modules/nanoclone/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Anton Kosykh
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.

47
server/node_modules/nanoclone/README.md generated vendored Normal file
View File

@@ -0,0 +1,47 @@
# nanoclone
[![license](https://img.shields.io/github/license/kelin2025/nanoclone.svg)](https://github.com/kelin2025/nanoclone/blob/master/LICENSE)
[![npm](https://img.shields.io/npm/v/nanoclone.svg)](https://npmjs.com/package/nanoclone)
Only **300B** to deep clone JavaScript objects
## Is it small enough?
See the size of the most popular **[clone](https://www.npmjs.com/package/clone)** npm package with **250M+** downloads
![image](https://user-images.githubusercontent.com/4208480/34631395-30df289c-f281-11e7-8442-01502af2097a.png)
And nanoclone size:
![image](https://user-images.githubusercontent.com/4208480/35292759-9c839f06-0082-11e8-9196-d710d530a74b.png)
## Supported
- [x] Primitives
- [x] Arrays
- [x] Plain objects
- [x] DOM Nodes
- [x] Date instances
- [x] RegExp instances
- [x] Maps
- [x] Sets
- [x] Circular structures
## Installation
```
yarn add nanoclone
npm install nanoclone
```
## Usage
```javascript
import clone from 'nanoclone'
let a = {
num: 2,
arr: [1, 2, 3],
nested: {
obj: {
a: 0
}
}
}
let b = clone(a)
```
## License
MIT

73
server/node_modules/nanoclone/index.js generated vendored Normal file
View File

@@ -0,0 +1,73 @@
'use strict';
// ES6 Map
var map;
try {
map = Map;
} catch (_) { }
var set;
// ES6 Set
try {
set = Set;
} catch (_) { }
function baseClone (src, circulars, clones) {
// Null/undefined/functions/etc
if (!src || typeof src !== 'object' || typeof src === 'function') {
return src
}
// DOM Node
if (src.nodeType && 'cloneNode' in src) {
return src.cloneNode(true)
}
// Date
if (src instanceof Date) {
return new Date(src.getTime())
}
// RegExp
if (src instanceof RegExp) {
return new RegExp(src)
}
// Arrays
if (Array.isArray(src)) {
return src.map(clone)
}
// ES6 Maps
if (map && src instanceof map) {
return new Map(Array.from(src.entries()))
}
// ES6 Sets
if (set && src instanceof set) {
return new Set(Array.from(src.values()))
}
// Object
if (src instanceof Object) {
circulars.push(src);
var obj = Object.create(src);
clones.push(obj);
for (var key in src) {
var idx = circulars.findIndex(function (i) {
return i === src[key]
});
obj[key] = idx > -1 ? clones[idx] : baseClone(src[key], circulars, clones);
}
return obj
}
// ???
return src
}
function clone (src) {
return baseClone(src, [], [])
}
module.exports = clone;

46
server/node_modules/nanoclone/package.json generated vendored Normal file
View File

@@ -0,0 +1,46 @@
{
"name": "nanoclone",
"version": "0.2.1",
"description": "300B to deep clone JavaScript objects",
"license": "MIT",
"main": "index.js",
"module": "src/index.js",
"keywords": [
"clone",
"deep",
"nano",
"nanoclone",
"deepclone"
],
"bugs": {
"url": "https://github.com/kelin2025/nanoclone/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/kelin2025/nanoclone"
},
"author": {
"email": "kelin2025@yandex.ru",
"name": "Anton Kosykh"
},
"scripts": {
"build": "rollup -c",
"lint": "eslint src/*.js test/*.js",
"pretest": "npm run build",
"test": "jest --coverage && npm run lint",
"size": "size-limit",
"prepublish": "npm run build"
},
"devDependencies": {
"eslint": "^4.11.0",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-standard": "^3.0.1",
"jest": "^21.2.1",
"jsdom": "^11.4.0",
"rollup": "^0.53.3",
"size-limit": "^0.13.2"
}
}

9
server/node_modules/nanoclone/rollup.config.js generated vendored Normal file
View File

@@ -0,0 +1,9 @@
import pkg from './package.json'
export default {
input: pkg.module,
output: {
file: pkg.main,
format: 'cjs'
}
}

69
server/node_modules/nanoclone/src/index.js generated vendored Normal file
View File

@@ -0,0 +1,69 @@
// ES6 Map
var map
try {
map = Map
} catch (_) { }
var set
// ES6 Set
try {
set = Set
} catch (_) { }
function baseClone (src, circulars, clones) {
// Null/undefined/functions/etc
if (!src || typeof src !== 'object' || typeof src === 'function') {
return src
}
// DOM Node
if (src.nodeType && 'cloneNode' in src) {
return src.cloneNode(true)
}
// Date
if (src instanceof Date) {
return new Date(src.getTime())
}
// RegExp
if (src instanceof RegExp) {
return new RegExp(src)
}
// Arrays
if (Array.isArray(src)) {
return src.map(clone)
}
// ES6 Maps
if (map && src instanceof map) {
return new Map(Array.from(src.entries()))
}
// ES6 Sets
if (set && src instanceof set) {
return new Set(Array.from(src.values()))
}
// Object
if (src instanceof Object) {
circulars.push(src)
var obj = Object.create(src)
clones.push(obj)
for (var key in src) {
var idx = circulars.findIndex(function (i) {
return i === src[key]
})
obj[key] = idx > -1 ? clones[idx] : baseClone(src[key], circulars, clones)
}
return obj
}
// ???
return src
}
export default function clone (src) {
return baseClone(src, [], [])
}