Update utils.js
This commit is contained in:
parent
c5643972e6
commit
2c6c194b59
|
@ -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+:|^)\/\//, '')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue