Update utils.js

This commit is contained in:
Aleksandr Statciuk 2021-08-10 04:15:11 +03:00
parent c5643972e6
commit 2c6c194b59
1 changed files with 0 additions and 11 deletions

View File

@ -1,4 +1,3 @@
const escapeStringRegexp = require('escape-string-regexp')
const transliteration = require('transliteration')
const iso6393 = require('@freearhey/iso-639-3')
const categories = require('./categories')
@ -71,16 +70,6 @@ utils.sortBy = function (arr, fields) {
})
}
utils.escapeStringRegexp = function (scring) {
return escapeStringRegexp(string)
}
utils.sleep = function (ms) {
return function (x) {
return new Promise(resolve => setTimeout(() => resolve(x), ms))
}
}
utils.removeProtocol = function (string) {
return string.replace(/(^\w+:|^)\/\//, '')
}