Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// fail-safe
try {
var ref = args[0];
if (REF_PATTERN.test(ref)) {
ref = ref.replace(REF_PATTERN, '');
args.shift();
} else {
ref = null;
}
var entry = {
category: category,
ref: ref,
message: format.apply(null, args)
};
this.entries.push(entry);
} catch (e) {
console.error(e);
}
};
function FormattedError(format) {
if (format) {
format = formatter.apply(null, arguments)
}
return new EConstructor(format)
}
}
function FormattedError(format) {
if (format) {
format = formatter.apply(null, arguments);
}
return new EConstructor(format);
}
}
function print(args) {
return printf.apply(null, args);
};
const L = function () {
arguments[0] = bundle.localizedStringForKeyValueTable(arguments[0], '', null);
return format.apply(this, arguments);
};
const L = function () {
if (resources && arguments.length) {
var resID = resources.getIdentifier(arguments[0], "string", packageName);
if (resID != 0) {
arguments[0] = resources.getString(resID);
return format.apply(this, arguments);
}
return arguments[0];
}
};