@jeniex/utils 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/browser/index.cjs CHANGED
@@ -126,8 +126,6 @@ function capitalize(sentence) {
126
126
  }
127
127
 
128
128
  const scriptName = GM.info.script.name;
129
- /** The identifier of the script to be used in logging. */
130
- const logId = `[${scriptName}]:`;
131
129
  /** The initial tab URL on the script run. */
132
130
  const tabURL = window.location.href;
133
131
 
@@ -461,6 +459,7 @@ async function getOptions(flags) {
461
459
 
462
460
  function customizeConsole(debug = false) {
463
461
  const base = window.console;
462
+ const logId = `[${scriptName}]:`;
464
463
  return {
465
464
  log: base.log.bind(base, logId),
466
465
  warn: base.warn.bind(base, logId),
@@ -496,7 +495,6 @@ exports.isObject = isObject;
496
495
  exports.isString = isString;
497
496
  exports.isTruthy = isTruthy;
498
497
  exports.join = join;
499
- exports.logId = logId;
500
498
  exports.noop = noop;
501
499
  exports.padZeros = padZeros;
502
500
  exports.pageLoad = pageLoad;
@@ -107,8 +107,6 @@ declare function setSearchParam(key: string, value: string, fullURL?: string): s
107
107
  declare function removeSearchParams(keys: string[], fullURL?: string): string;
108
108
 
109
109
  declare const scriptName: string;
110
- /** The identifier of the script to be used in logging. */
111
- declare const logId: string;
112
110
  /** The initial tab URL on the script run. */
113
111
  declare const tabURL: string;
114
112
 
@@ -169,4 +167,4 @@ interface CustomizedConsole {
169
167
 
170
168
  declare function customizeConsole(debug?: boolean): CustomizedConsole;
171
169
 
172
- export { $, $$, Flag, Fn, Nullable, Prettify, addStyle, alert, asserted, capitalize, checkVPN, checkVPNRandomly, confirm, customizeConsole, fish, fishResponse, fishX, fishXResponse, getOptions, getSearchParam, imageLoad, isBoolean, isFalsy, isFunction, isNotNullish, isNullish, isNumber, isObject, isString, isTruthy, join, logId, noop, padZeros, pageLoad, prompt, remove, removeSearchParams, saveFile, scriptName, setSearchParam, sleep, tabURL, toString };
170
+ export { $, $$, Flag, Fn, Nullable, Prettify, addStyle, alert, asserted, capitalize, checkVPN, checkVPNRandomly, confirm, customizeConsole, fish, fishResponse, fishX, fishXResponse, getOptions, getSearchParam, imageLoad, isBoolean, isFalsy, isFunction, isNotNullish, isNullish, isNumber, isObject, isString, isTruthy, join, noop, padZeros, pageLoad, prompt, remove, removeSearchParams, saveFile, scriptName, setSearchParam, sleep, tabURL, toString };
package/browser/index.js CHANGED
@@ -124,8 +124,6 @@ function capitalize(sentence) {
124
124
  }
125
125
 
126
126
  const scriptName = GM.info.script.name;
127
- /** The identifier of the script to be used in logging. */
128
- const logId = `[${scriptName}]:`;
129
127
  /** The initial tab URL on the script run. */
130
128
  const tabURL = window.location.href;
131
129
 
@@ -459,6 +457,7 @@ async function getOptions(flags) {
459
457
 
460
458
  function customizeConsole(debug = false) {
461
459
  const base = window.console;
460
+ const logId = `[${scriptName}]:`;
462
461
  return {
463
462
  log: base.log.bind(base, logId),
464
463
  warn: base.warn.bind(base, logId),
@@ -467,4 +466,4 @@ function customizeConsole(debug = false) {
467
466
  };
468
467
  }
469
468
 
470
- export { $, $$, addStyle, alert, asserted, capitalize, checkVPN, checkVPNRandomly, confirm, customizeConsole, fish, fishResponse, fishX, fishXResponse, getOptions, getSearchParam, imageLoad, isBoolean, isFalsy, isFunction, isNotNullish, isNullish, isNumber, isObject, isString, isTruthy, join, logId, noop, padZeros, pageLoad, prompt, remove, removeSearchParams, saveFile, scriptName, setSearchParam, sleep, tabURL, toString };
469
+ export { $, $$, addStyle, alert, asserted, capitalize, checkVPN, checkVPNRandomly, confirm, customizeConsole, fish, fishResponse, fishX, fishXResponse, getOptions, getSearchParam, imageLoad, isBoolean, isFalsy, isFunction, isNotNullish, isNullish, isNumber, isObject, isString, isTruthy, join, noop, padZeros, pageLoad, prompt, remove, removeSearchParams, saveFile, scriptName, setSearchParam, sleep, tabURL, toString };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jeniex/utils",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "author": "JenieX",
5
5
  "homepage": "https://github.com/JenieX/utils",
6
6
  "type": "module",