538 B
538 B
Grim.js — escapeNBT() (satır 723)
function escapeNBT(s) {
return String(s).replace(/\\/g, "\\\\").replace(/"/g, '\\"');
}
function trim(s) {
return String(s || "").replace(/^\s+|\s+$/g, "");
}
function lower(s) {
return String(s || "").toLowerCase();
}
function isUrl(s) {
s = lower(trim(s));
return s.indexOf("http://") === 0 || s.indexOf("https://") === 0;
}
function nowMs() {
return Date.now();
}