8import { PrivateKey } from "@hiveio/dhive";
9
10import { app } from "./../src/app";
11import { rpcClient } from "./../src/common";12
13import { testKeys } from "./index";
14
5import * as path from "path";
6import * as fs from "fs";
7import * as crypto from "crypto";
8import { PrivateKey } from "@hiveio/dhive"; 9
10import { app } from "./../src/app";
11import { rpcClient } from "./../src/common";
98 `http://localhost:${port}/0x0/${uploaded.body.url}`,
99 );
100 const image = sharp(res.body);
101 const meta = await image.metadata();102 assert(
103 (await storeExists(proxyStore, key)) === false,
104 "proxy store has original",
92 fs.readFileSync(path.resolve(__dirname, "test.jpg")),
93 port,
94 );
95 const [key, fname] = uploaded.body.url.split("/").slice(-2); 96 const res = await needle(
97 "get",
98 `http://localhost:${port}/0x0/${uploaded.body.url}`,
8import * as sharp from "sharp";
9
10import { app } from "./../src/app";
11import { proxyStore, uploadStore } from "./../src/common"; 12import { storeExists, base58Enc } from "./../src/utils";
13
14import { uploadImage } from "./upload";
Unused variables are generally considered a code smell and should be avoided.
Removing unused references - It prevents unused modules from being loaded at runtime, improving performance, and preventing the compiler from loading metadata that will never be used. - It prevents conflicts that may occur when trying to reference another variable.
NOTE: If you have intentionally left a variable unused, we suggest you to prefix the variable name with a _
to prevent them from being flagged by DeepSource.
import fs from 'fs' // <- unused
import { readFileSync } from 'fs'
const text = readFileSync('declaration_of_independence.txt', 'utf-8')
console.log(text)
import { readFileSync } from 'fs'
const text = readFileSync('declaration_of_independence.txt', 'utf-8')
console.log(text)