mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-19 06:38:55 +08:00
test: remove useless code
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
const pathToRegExp = require('path-to-regexp');
|
||||
const readall = require('readall');
|
||||
const crypto = require('crypto');
|
||||
|
||||
const paired = (route, path) => {
|
||||
const options = {
|
||||
@@ -11,24 +9,6 @@ const paired = (route, path) => {
|
||||
return pathToRegExp(route, [], options).exec(path);
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const read = (stream) =>
|
||||
new Promise((resolve, reject) => {
|
||||
readall(stream, (err, data) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
resolve(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const md5 = (str) =>
|
||||
crypto
|
||||
.createHash('md5')
|
||||
.update(str)
|
||||
.digest('hex');
|
||||
|
||||
const validityCheck = (routes, exclude, path) => {
|
||||
let match = false;
|
||||
let routeExpire = false;
|
||||
@@ -59,7 +39,5 @@ const validityCheck = (routes, exclude, path) => {
|
||||
|
||||
module.exports = {
|
||||
paired,
|
||||
read,
|
||||
md5,
|
||||
validityCheck,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user