//- DS2 core (c) 2024 Alexander McIlwraith Core licensed under CC BY-SA 4.0 include ../_config block config mixin h(h) if headings[h] if headings[h].indexOf("|") == -1 h2= headings[h] else - var cntnt = headings[h].split("|") | <#{cntnt[0]}>#{cntnt[1]} - const getDate = function(){ - var d = new Date(); - return d.toLocaleDateString(lang, {day: "numeric", month: "long", year: "numeric"}); - } - String.prototype.toTitleCase = function() { - return this.replace(/\w\S*/g, function(txt) { - return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); - }); - } - String.prototype.toSentenceCase = function() { - return this.charAt(0).toUpperCase() + this.substr(1).toLowerCase(); - } - String.prototype.toContent = function() { - return this.replace(/-/g, " "); - } - String.prototype.toPath = function() { - return this.trim().replace(/ /g, "_").replace(/-/g, "_").replace(/[\/\W]/g, "").replace(/_/g, "-"); - } html head title Pattern body(data-assetpath= assetpath data-prismjs-copy-timeout="1500") block content