From 526c568c4ed2bb2f7446ba92d07b8875e198692d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jimmy=20Wa=CC=88rting?= Date: Mon, 15 Nov 2021 18:33:55 +0100 Subject: [PATCH] remove deep-clone --- lib/list.js | 3 +-- lib/models/maintainer.js | 2 +- lib/registry.js | 3 +-- lib/view.js | 2 +- package.json | 1 - 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/list.js b/lib/list.js index 86cb175..8c7d121 100644 --- a/lib/list.js +++ b/lib/list.js @@ -2,7 +2,6 @@ const url = require('url'); const fetch = require('node-fetch'); -const utils = require('./utils.js'); const config = require('./config.js'); /** @typedef {import('./view.js')} View */ @@ -25,7 +24,7 @@ class List { constructor(name, view) { this.name = name; this.view = view; - this.config = utils.clone(config); + this.config = {...config}; this.config.pathname += '/_list/' + this.view.name + '/' + this.name; } diff --git a/lib/models/maintainer.js b/lib/models/maintainer.js index 314c144..fa1bc41 100644 --- a/lib/models/maintainer.js +++ b/lib/models/maintainer.js @@ -20,7 +20,7 @@ class Maintainer extends Base { constructor(name) { super(); this.name = name; - this.config = utils.clone(config); + this.config = {...config}; } /** diff --git a/lib/registry.js b/lib/registry.js index 227f787..d5ab9ad 100644 --- a/lib/registry.js +++ b/lib/registry.js @@ -1,7 +1,6 @@ 'use strict'; const fetch = require('node-fetch'); -const utils = require('./utils.js'); const config = require('./config.js'); /** @@ -18,7 +17,7 @@ const config = require('./config.js'); class Registry { constructor() { - this.config = utils.clone(config); + this.config = {...config}; } /** diff --git a/lib/view.js b/lib/view.js index b5b967f..848f3cc 100644 --- a/lib/view.js +++ b/lib/view.js @@ -21,7 +21,7 @@ const config = require('./config.js'); class View { constructor(name) { this.name = name; - this.config = utils.clone(config); + this.config = {...config}; this.config.pathname += '/_view/' + this.name; } diff --git a/package.json b/package.json index 421d875..042bfa1 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,6 @@ "mocha": "^6.1.4" }, "dependencies": { - "clone-deep": "^4.0.1", "download-stats": "^0.3.4", "JSONStream": "^1.3.5", "moment": "^2.24.0",