diff options
| author | Adam Mathes <adam@adammathes.com> | 2026-02-14 14:46:37 -0800 |
|---|---|---|
| committer | Adam Mathes <adam@adammathes.com> | 2026-02-14 14:46:37 -0800 |
| commit | afa87af01c79a9baa539f2992d32154d2a4739bd (patch) | |
| tree | 92c7416db734270a2fee1d72ee9cc119379ff8e1 /vanilla/node_modules/obug/dist/core.js | |
| parent | 3b927e84d200402281f68181cd4253bc77e5528d (diff) | |
| download | neko-afa87af01c79a9baa539f2992d32154d2a4739bd.tar.gz neko-afa87af01c79a9baa539f2992d32154d2a4739bd.tar.bz2 neko-afa87af01c79a9baa539f2992d32154d2a4739bd.zip | |
task: delete vanilla js prototype\n\n- Removed vanilla/ directory and web/dist/vanilla directory\n- Updated Makefile, Dockerfile, and CI workflow to remove vanilla references\n- Cleaned up web/web.go to remove vanilla embed and routes\n- Verified build and tests pass\n\nCloses NK-2tcnmq
Diffstat (limited to 'vanilla/node_modules/obug/dist/core.js')
| -rw-r--r-- | vanilla/node_modules/obug/dist/core.js | 120 |
1 files changed, 0 insertions, 120 deletions
diff --git a/vanilla/node_modules/obug/dist/core.js b/vanilla/node_modules/obug/dist/core.js deleted file mode 100644 index db2abcd..0000000 --- a/vanilla/node_modules/obug/dist/core.js +++ /dev/null @@ -1,120 +0,0 @@ -function coerce(value) { - if (value instanceof Error) return value.stack || value.message; - return value; -} -function selectColor(colors, namespace) { - let hash = 0; - for (let i = 0; i < namespace.length; i++) { - hash = (hash << 5) - hash + namespace.charCodeAt(i); - hash |= 0; - } - return colors[Math.abs(hash) % colors.length]; -} -function matchesTemplate(search, template) { - let searchIndex = 0; - let templateIndex = 0; - let starIndex = -1; - let matchIndex = 0; - while (searchIndex < search.length) if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) if (template[templateIndex] === "*") { - starIndex = templateIndex; - matchIndex = searchIndex; - templateIndex++; - } else { - searchIndex++; - templateIndex++; - } - else if (starIndex !== -1) { - templateIndex = starIndex + 1; - matchIndex++; - searchIndex = matchIndex; - } else return false; - while (templateIndex < template.length && template[templateIndex] === "*") templateIndex++; - return templateIndex === template.length; -} -function humanize(value) { - if (value >= 1e3) return `${(value / 1e3).toFixed(1)}s`; - return `${value}ms`; -} -let globalNamespaces = ""; -function namespaces() { - return globalNamespaces; -} -function createDebug(namespace, options) { - let prevTime; - let enableOverride; - let namespacesCache; - let enabledCache; - const debug = (...args) => { - if (!debug.enabled) return; - const curr = Date.now(); - const diff = curr - (prevTime || curr); - prevTime = curr; - args[0] = coerce(args[0]); - if (typeof args[0] !== "string") args.unshift("%O"); - let index = 0; - args[0] = args[0].replace(/%([a-z%])/gi, (match, format) => { - if (match === "%%") return "%"; - index++; - const formatter = options.formatters[format]; - if (typeof formatter === "function") { - const value = args[index]; - match = formatter.call(debug, value); - args.splice(index, 1); - index--; - } - return match; - }); - options.formatArgs.call(debug, diff, args); - debug.log(...args); - }; - debug.extend = function(namespace$1, delimiter = ":") { - return createDebug(this.namespace + delimiter + namespace$1, { - useColors: this.useColors, - color: this.color, - formatArgs: this.formatArgs, - formatters: this.formatters, - inspectOpts: this.inspectOpts, - log: this.log, - humanize: this.humanize - }); - }; - Object.assign(debug, options); - debug.namespace = namespace; - Object.defineProperty(debug, "enabled", { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride != null) return enableOverride; - if (namespacesCache !== globalNamespaces) { - namespacesCache = globalNamespaces; - enabledCache = enabled(namespace); - } - return enabledCache; - }, - set: (v) => { - enableOverride = v; - } - }); - return debug; -} -let names = []; -let skips = []; -function enable(namespaces$1) { - globalNamespaces = namespaces$1; - names = []; - skips = []; - const split = globalNamespaces.trim().replace(/\s+/g, ",").split(",").filter(Boolean); - for (const ns of split) if (ns[0] === "-") skips.push(ns.slice(1)); - else names.push(ns); -} -function disable() { - const namespaces$1 = [...names, ...skips.map((namespace) => `-${namespace}`)].join(","); - enable(""); - return namespaces$1; -} -function enabled(name) { - for (const skip of skips) if (matchesTemplate(name, skip)) return false; - for (const ns of names) if (matchesTemplate(name, ns)) return true; - return false; -} -export { namespaces as a, enabled as i, disable as n, humanize as o, enable as r, selectColor as s, createDebug as t }; |
