Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.catch(function () {
// silent failure
});
}
return idb.put(idb.stores.state, key, namespaces)
.catch(function (error) {
console.error('debug failed to save namespace', error);
});
};
/***
* Echo the functionality of debugLib.
* On module load, enable from storage.
*/
debugLib.load().then(function (namespaces) {
debugLib.enable(namespaces);
});
/**
* Wrap the main debugLib function
*
* @param {String} namespace
* @returns {Function} The debug function for chaining.
*/
export default function debugWrapper (namespace) {
return debugLib('sw:'+namespace);
}
// Mixin all debugLib props and methods
// eslint-disable-next-line no-unused-vars
for (let item in debugLib) {
function enableDebug() {
// react-packager logs debug messages using the 'debug' npm package, and uses
// the following prefix throughout.
// To enable debugging, we need to set our pattern or append it to any
// existing pre-configured pattern to avoid disabling logging for
// other packages
var debugPattern = 'RNP:*';
var existingPattern = debug.load();
if (existingPattern) {
debugPattern += ',' + existingPattern;
}
debug.enable(debugPattern);
}
function enableDebug() {
// Metro Bundler logs debug messages using the 'debug' npm package, and uses
// the following prefix throughout.
// To enable debugging, we need to set our pattern or append it to any
// existing pre-configured pattern to avoid disabling logging for
// other packages
var debugPattern = 'Metro:*';
var existingPattern = debug.load();
if (existingPattern) {
debugPattern += ',' + existingPattern;
}
debug.enable(debugPattern);
}
function enableDebug() {
// react-packager logs debug messages using the 'debug' npm package, and uses
// the following prefix throughout.
// To enable debugging, we need to set our pattern or append it to any
// existing pre-configured pattern to avoid disabling logging for
// other packages
var debugPattern = 'RNP:*';
var existingPattern = debug.load();
if (existingPattern) {
debugPattern += ',' + existingPattern;
}
debug.enable(debugPattern);
}
static debug (namespace = '*') {
// if localStorage.DEBUG (browser)
// or process.env.DEBUG (node) is not set
if (!debug.load()) {
debug.enable(namespace)
}
}
function enableDebug() {
// react-packager logs debug messages using the 'debug' npm package, and uses
// the following prefix throughout.
// To enable debugging, we need to set our pattern or append it to any
// existing pre-configured pattern to avoid disabling logging for
// other packages
var debugPattern = 'ReactNativePackager:*';
var existingPattern = debug.load();
if (existingPattern) {
debugPattern += ',' + existingPattern;
}
debug.enable(debugPattern);
}
function enableDebug() {
// react-packager logs debug messages using the 'debug' npm package, and uses
// the following prefix throughout.
// To enable debugging, we need to set our pattern or append it to any
// existing pre-configured pattern to avoid disabling logging for
// other packages
var debugPattern = 'RNP:*';
var existingPattern = debug.load();
if (existingPattern) {
debugPattern += ',' + existingPattern;
}
debug.enable(debugPattern);
}