KJ
This commit is contained in:
dopeuni444
2025-08-06 11:08:49 +04:00
parent b5a22951ae
commit ae726301f8
8715 changed files with 588619 additions and 243113 deletions

View File

@@ -0,0 +1,11 @@
var adapter = require('./');
/**
* Extracts the values from process.env.
*
* @type {Function}
* @public
*/
module.exports = adapter(function hash() {
return /(debug|diagnostics)=([^&]+)/i.exec(window.location.hash)[2];
});

View File

@@ -0,0 +1,18 @@
var enabled = require('enabled');
/**
* Creates a new Adapter.
*
* @param {Function} fn Function that returns the value.
* @returns {Function} The adapter logic.
* @public
*/
module.exports = function create(fn) {
return function adapter(namespace) {
try {
return enabled(namespace, fn());
} catch (e) { /* Any failure means that we found nothing */ }
return false;
};
}

View File

@@ -0,0 +1,11 @@
var adapter = require('./');
/**
* Extracts the values from process.env.
*
* @type {Function}
* @public
*/
module.exports = adapter(function storage() {
return localStorage.getItem('debug') || localStorage.getItem('diagnostics');
});

View File

@@ -0,0 +1,11 @@
var adapter = require('./');
/**
* Extracts the values from process.env.
*
* @type {Function}
* @public
*/
module.exports = adapter(function processenv() {
return process.env.DEBUG || process.env.DIAGNOSTICS;
});