MCPcopy Create free account
hub / github.com/breck7/scroll / _permalink

Method _permalink

external/.scrollLibs.js:14202–14204  ·  view source on GitHub ↗
(str, reg)

Source from the content-addressed store, hash-verified

14200 }
14201 // Only allows a-zA-Z0-9-_ (And optionally .)
14202 static _permalink(str, reg) {
14203 return str.length ? str.toLowerCase().replace(reg, "").replace(/ /g, "-") : ""
14204 }
14205 static isValueEmpty(value) {
14206 return value === undefined || value === "" || (typeof value === "number" && isNaN(value)) || (value instanceof Date && isNaN(value))
14207 }

Callers 1

stringToPermalinkMethod · 0.95

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected