MCPcopy
hub / github.com/kickscondor/fraidycat / urlToID

Function urlToID

src/js/util.js:67–70  ·  view source on GitHub ↗
(normLink)

Source from the content-addressed store, hash-verified

65}
66
67export function urlToID (normLink) {
68 let hashInt = normLink.split("").reduce(function(a,b){a=((a<<5)-a)+b.charCodeAt(0);return a&a},0)
69 return `${normLink.split('/')[0]}-${(hashInt >>> 0).toString(16)}`
70}
71
72export function followTitle(follow) {
73 return (follow.title || follow.actualTitle || follow.url).toString()

Callers 5

scrapeFunction · 0.90
fetchfeedFunction · 0.90
urlDetailsFunction · 0.90
syncFunction · 0.90
importListFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected