Socket
Socket
Sign inDemoInstall

vconsole

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vconsole - npm Package Compare versions

Comparing version 3.4.0 to 3.4.1

240

CHANGELOG_CN.md
[English](./CHANGELOG.md) | 简体中文
#### V3.4.1 (2021-04-09)
- `Feature(General)` 新增 `setSwitchPosition(x, y)` 方法以更新开关按钮的位置,见 [Public Properties & Methods](./doc/public_properties_methods_CN.md)。
- `Perf(General)` 添加 `Symbol` polyfill。(issue #361)
- `Fix(General)` 修复 `setOption()` 后主题样式未及时更新的问题。
- `Fix(General)` 删除 `transitionEnd` 以避免一些兼容性问题。(issue #364)
- `Fix(Network)` 修复 `fetch` 的 `init` 未考虑为可选参数的问题。(issue #363, #365)
- `Fix(Network)` 修复 XSS 漏洞。
#### V3.4.0 (2021-01-14)
- 【特性】支持暗黑模式,配置项 `vConsole.option.theme` 见 [Public Properties & Methods](./doc/public_properties_methods_CN.md)。(by @progrape)
- 【特性】Network 面板支持 `fetch` 网络记录。(by @weiqian93)
- 【特性】Network 面板支持显示 Request Headers。
- 【特性】Network 面板仅显示简短网址,URL 参数将显示在详细信息中。(issue #291)
- 【特性】System 面板增加显示 `Location` 信息。(issue #343)
- 【特性】开关按钮加入拖拽安全区,避免遮挡全面屏手机底部操作区。(issue #353)
- 【特性】指令输入框键入括号且自动补全括号后,光标将自动移动到括号内部。(issue #293)
- 【特性】新第三方插件 [vconsole-stats-plugin](https://github.com/smackgg/vConsole-Stats)。(by @smackgg)
- 【修复】修复点击开关按钮后位置会被重置的问题。
- 【修复】修复 `document.documentElement.offsetHeight|offsetWidth` 在新浏览器中不够准确的问题。(by @littlee)
- 【修复】阻止用户事件派发到 readOnly 或 disabled 的 element 上。(by @norux)
- 【修复】修复 nonce 查找不准确的问题。(by @sunderls)
- 【修复】修复一个安全问题。(#345 by @QiAnXinCodeSafe)
- 【修复】屏蔽 "webkitStorageInfo deprecation" 告警。
- 【修复】删除 `Symbol`、`Array.from` polyfill。(issue #325, #275)
- 【修复】日志中显示对象内所有的 enumerable 和 unenumerable 属性。 (issue #327)
- 【优化】更新 Webpack DevServer 的配置项。(by @QinZhen001)
- `Feature(General)` 支持暗黑模式,配置项 `vConsole.option.theme` 见 [Public Properties & Methods](./doc/public_properties_methods_CN.md)。(by @progrape)
- `Feature(General)` 开关按钮加入拖拽安全区,避免遮挡全面屏手机底部操作区。(issue #353)
- `Feature(Log)` 指令输入框键入括号且自动补全括号后,光标将自动移动到括号内部。(issue #293)
- `Feature(System)` 增加显示 `Location` 信息。(issue #343)
- `Feature(Network)`支持 `fetch` 网络记录。(by @weiqian93)
- `Feature(Network)` 支持显示 Request Headers。
- `Feature(Network)` 仅显示简短网址,URL 参数将显示在详细信息中。(issue #291)
- `Feature(Plugin)` 新第三方插件 [vconsole-stats-plugin](https://github.com/smackgg/vConsole-Stats)。(by @smackgg)
- `Fix(General)` 修复点击开关按钮后位置会被重置的问题。
- `Fix(General)` 修复 `document.documentElement.offsetHeight|offsetWidth` 在新浏览器中不够准确的问题。(by @littlee)
- `Fix(General)` 阻止用户事件派发到 readOnly 或 disabled 的 element 上。(by @norux)
- `Fix(General)` 修复 nonce 查找不准确的问题。(by @sunderls)
- `Fix(General)` 修复一个安全问题。(#345 by @QiAnXinCodeSafe)
- `Fix(General)` 屏蔽 "webkitStorageInfo deprecation" 告警。
- `Perf(General)` 删除 `Symbol`、`Array.from` polyfill。(issue #325, #275)
- `Perf(General)` 日志中显示对象内所有的 enumerable 和 unenumerable 属性。 (issue #327)
- `Chore` 更新 Webpack DevServer 的配置项。(by @QinZhen001)

@@ -26,7 +36,7 @@

- 【特性】增加 `%c` 以支持自定义日志样式,详情见 [使用教程](./doc/tutorial_CN.md)。
- 【特性】增加 `VConsole.VConsoleLogPlugin` 等 `VConsole.VConsole*` 内置插件在 `VConsole` class 上的挂载。
- 【优化】在 `window DOMContentLoaded` 而不是 `window load` 时显示 vConsole。
- 【修复】修复当 cookie `path=/` 或设置了 `domain` 时删除失败的问题。(#264 by @qianxinfeng)
- 【修复】修复若干小问题。(#267 by @Molunerfinn, #272 by @domom)
- `Feature(Log)` 增加 `%c` 以支持自定义日志样式,详情见 [使用教程](./doc/tutorial_CN.md)。
- `Feature(Plugin)` 增加 `VConsole.VConsoleLogPlugin` 等 `VConsole.VConsole*` 内置插件在 `VConsole` class 上的挂载。
- `Fix(General)` 修复若干小问题。(#267 by @Molunerfinn, #272 by @domom)
- `Fix(Storage)` 修复当 cookie `path=/` 或设置了 `domain` 时删除失败的问题。(#264 by @qianxinfeng)
- `Perf(General)` 在 `window DOMContentLoaded` 而不是 `window load` 时显示 vConsole。

@@ -36,6 +46,6 @@

- 【特性】增加 TypeScript 声明文件。(by @jas0ncn)
- 【修复】修复开关按钮拖动后位置不对的问题。(by @rexschuang)
- 【修复】不在列表底部时避免自动滚动。(by @ele828)
- 【修复】修复若干小问题。(by @stenders)
- `Feature(General)` 增加 TypeScript 声明文件。(by @jas0ncn)
- `Fix(General)` 修复开关按钮拖动后位置不对的问题。(by @rexschuang)
- `Fix(General)` 修复若干小问题。(by @stenders)
- `Fix(Log)` 不在列表底部时避免自动滚动。(by @ele828)

@@ -45,4 +55,4 @@

- 【特性】新增自动合并相同日志的能力。频繁输出相同日志时不再会被刷屏。
- 【修复】修复格式化日志(如 `console.log('[foo]', 'bar')`)无法显示到 Log 面板的问题。
- `Feature(Log)` 新增自动合并相同日志的能力。频繁输出相同日志时不再会被刷屏。
- `Fix(Log)` 修复格式化日志(如 `console.log('[foo]', 'bar')`)无法显示到 Log 面板的问题。

@@ -52,10 +62,10 @@

- 【特性】新增控制台输入提示。 (by @65147400)
- 【特性】支持 SessionStorage。 (by @hkc452)
- 【修复】修复 `JSON.stringify` 函数被错误地改写的问题。
- 【修复】修复清空日志时没有重置 `logNumber` 的问题。 (by @liuyuekeng)
- 【修复】修复 Network 面板中 HTML 标签未被 encode 的问题。 (by @mokang)
- 【修复】修复 Storage 面板 decode 内容时可能会导致崩溃的问题。 (by @wolfsilver)
- 【修复】修复 CSP 签名获取失败问题。 (by @scotthuang)
- 【优化】增加底部安全区域,适配 iPhone X 等全面屏。 (by @dingyi1993)
- `Feature` 新增控制台输入提示。 (by @65147400)
- `Feature` 支持 SessionStorage。 (by @hkc452)
- `Fix` 修复 `JSON.stringify` 函数被错误地改写的问题。
- `Fix` 修复清空日志时没有重置 `logNumber` 的问题。 (by @liuyuekeng)
- `Fix` 修复 Network 面板中 HTML 标签未被 encode 的问题。 (by @mokang)
- `Fix` 修复 Storage 面板 decode 内容时可能会导致崩溃的问题。 (by @wolfsilver)
- `Fix` 修复 CSP 签名获取失败问题。 (by @scotthuang)
- `Perf` 增加底部安全区域,适配 iPhone X 等全面屏。 (by @dingyi1993)

@@ -65,7 +75,7 @@

- 【特性】支持 `console.time()` 及 `console.timeEnd()`。
- 【特性】新增 `disableLogScrolling` 配置项(`vConsole.option`),用于禁止新日志引起的自动滚动到底部。
- 【修复】修复初始化后立即调用 `setOption` 引起的错误。
- 【修复】修复 cookies 显示错误的问题。
- 【修复】修复 "Uncaught InvalidStateError" 错误。 (by @fireyy)
- `Feature` 支持 `console.time()` 及 `console.timeEnd()`。
- `Feature` 新增 `disableLogScrolling` 配置项(`vConsole.option`),用于禁止新日志引起的自动滚动到底部。
- `Fix` 修复初始化后立即调用 `setOption` 引起的错误。
- `Fix` 修复 cookies 显示错误的问题。
- `Fix` 修复 "Uncaught InvalidStateError" 错误。 (by @fireyy)

@@ -75,7 +85,7 @@

- 【特性】新增 `vConsole.showSwitch()` 及 `vConsole.hideSwitch()` 方法,请查阅[公共属性及方法](./doc/public_properties_methods_CN.md)。
- 【特性】新增 `onReady` 及 `onClearLog` 回调方法,位于 `vConsole.option`。
- 【特性】调用 `console.clear` 时将自动清除面板中的日志。
- 【修复】修复 Windows 下构建引起的 `\r` 转义问题。
- 【修复】修复 iOS8 或其它低版本系统中的 `Symbol` 错误。
- `Feature` 新增 `vConsole.showSwitch()` 及 `vConsole.hideSwitch()` 方法,请查阅[公共属性及方法](./doc/public_properties_methods_CN.md)。
- `Feature` 新增 `onReady` 及 `onClearLog` 回调方法,位于 `vConsole.option`。
- `Feature` 调用 `console.clear` 时将自动清除面板中的日志。
- `Fix` 修复 Windows 下构建引起的 `\r` 转义问题。
- `Fix` 修复 iOS8 或其它低版本系统中的 `Symbol` 错误。

@@ -87,19 +97,19 @@

- 【特性】需要手动初始化 vConsole:`var vConsole = new VConsole(option)`。
- 【特性】新增 `vConsole.option` 配置项,配置项可在实例化时传入,也可通过 `vConsole.setOption(key, value)` 更新。
- 【特性】支持自定义按需加载内置插件,配置项为 `option` 里的 `defaultPlugins` 字段。
- 【优化】支持 CSP 规则 `unsafe-eval` 和 `unsafe-inline`。
- 【优化】优化 `initial-scale < 1` 时的 `font-size`。
- `Feature` 需要手动初始化 vConsole:`var vConsole = new VConsole(option)`。
- `Feature` 新增 `vConsole.option` 配置项,配置项可在实例化时传入,也可通过 `vConsole.setOption(key, value)` 更新。
- `Feature` 支持自定义按需加载内置插件,配置项为 `option` 里的 `defaultPlugins` 字段。
- `Perf` 支持 CSP 规则 `unsafe-eval` 和 `unsafe-inline`。
- `Perf` 优化 `initial-scale < 1` 时的 `font-size`。
Log 插件:
- 【特性】支持 `maxLogNumber` 配置项,以控制面板内展示的最多日志数量。
- 【修复】修复打印大型复杂 object 时引起的崩溃问题。
- 【优化】只有 `console.log('[system]', xxx)` 这种将 `[system]` 放在第一位参数的写法,才会输出到 System 面板。因此可以规避 `[foo] bar` 这类格式无法正确打印到 Log 面板的问题。
- `Feature` 支持 `maxLogNumber` 配置项,以控制面板内展示的最多日志数量。
- `Fix` 修复打印大型复杂 object 时引起的崩溃问题。
- `Perf` 只有 `console.log('[system]', xxx)` 这种将 `[system]` 放在第一位参数的写法,才会输出到 System 面板。因此可以规避 `[foo] bar` 这类格式无法正确打印到 Log 面板的问题。
Network 插件:
- 【特性】新增 `Query String Parameters` 和 `Form Data` 两栏,以展示 GET 和 POST 的参数。
- 【优化】自动格式化展示 JSON 类型的回包。
- 【修复】修复 status 一直为 "Pending" 的问题。这种问题一般是引入了第三方的 HTTP 库而引起的。
- `Feature` 新增 `Query String Parameters` 和 `Form Data` 两栏,以展示 GET 和 POST 的参数。
- `Perf` 自动格式化展示 JSON 类型的回包。
- `Fix` 修复 status 一直为 "Pending" 的问题。这种问题一般是引入了第三方的 HTTP 库而引起的。

@@ -109,6 +119,6 @@

- 【特性】在 `init` 事件触发时/之后,插件实例内可以通过 `this.vConsole` 来获取到 vConsole 的对象实例。
- 【特性】新增 `updateOption` 事件,以监测 `vConsole.option` 的更新。
- 【特性】新增 Element 面板作为默认的内置插件。
- 【特性】新增 Storage 面板作为默认的内置插件。
- `Feature` 在 `init` 事件触发时/之后,插件实例内可以通过 `this.vConsole` 来获取到 vConsole 的对象实例。
- `Feature` 新增 `updateOption` 事件,以监测 `vConsole.option` 的更新。
- `Feature` 新增 Element 面板作为默认的内置插件。
- `Feature` 新增 Storage 面板作为默认的内置插件。

@@ -121,3 +131,3 @@

- 【修复】捕获执行自定义命令行时发生的错误。
- `Fix` 捕获执行自定义命令行时发生的错误。

@@ -127,5 +137,5 @@

- 【修复】修复一些情况下的 `scrollHeight` 错误。
- 【修复】修正 iOS 8 下的 flex 布局问题。
- 【优化】性能增强。
- `Fix` 修复一些情况下的 `scrollHeight` 错误。
- `Fix` 修正 iOS 8 下的 flex 布局问题。
- `Perf` 性能增强。

@@ -135,6 +145,6 @@

- 【特性】新增 `vConsole.removePlugin()` 方法,请查阅[公共属性及方法](./doc/public_properties_methods_CN.md)。
- 【特性】新增 `remove` 插件事件,请查阅[插件:Event 事件列表](./doc/plugin_event_list_CN.md)。
- 【优化】页面不会随着 vConsole 的滚动而滚动。
- 【修复】修正 `window.onerror()` 内的函数调用笔误。
- `Feature` 新增 `vConsole.removePlugin()` 方法,请查阅[公共属性及方法](./doc/public_properties_methods_CN.md)。
- `Feature` 新增 `remove` 插件事件,请查阅[插件:Event 事件列表](./doc/plugin_event_list_CN.md)。
- `Perf` 页面不会随着 vConsole 的滚动而滚动。
- `Fix` 修正 `window.onerror()` 内的函数调用笔误。

@@ -144,8 +154,8 @@

- 【特性】新增 `addTopBar` 插件事件,请查阅[插件:Event 事件列表](./doc/plugin_event_list_CN.md)。
- 【特性】新增日志类型筛选功能。
- 【优化】若 log 列表不处于最底部,当打印新 log 时,列表则不会自动滚动到最新 log 处。
- 【优化】优化了一些 UI 样式问题。
- 【修复】修正打印 object 类型 log 时的 XSS 问题。
- 【修复】在某些特殊情况中,开关按钮将不会再被定位出页面外。
- `Feature` 新增 `addTopBar` 插件事件,请查阅[插件:Event 事件列表](./doc/plugin_event_list_CN.md)。
- `Feature` 新增日志类型筛选功能。
- `Perf` 若 log 列表不处于最底部,当打印新 log 时,列表则不会自动滚动到最新 log 处。
- `Perf` 优化了一些 UI 样式问题。
- `Fix` 修正打印 object 类型 log 时的 XSS 问题。
- `Fix` 在某些特殊情况中,开关按钮将不会再被定位出页面外。

@@ -155,4 +165,4 @@

- 【修复】删除 V2.3.0 中的 `tap` 事件,恢复为 `click` 事件(依旧支持快速响应),以避免冲突。
- 【优化】删除 System tab 中的 `now` 项目并新增 `navigationStart` 时间戳。
- `Fix` 删除 V2.3.0 中的 `tap` 事件,恢复为 `click` 事件(依旧支持快速响应),以避免冲突。
- `Perf` 删除 System tab 中的 `now` 项目并新增 `navigationStart` 时间戳。

@@ -162,5 +172,5 @@

- 【特性】支持逐级展开 Object 或 Array 的子元素。
- 【特性】支持显示 Object 内的不可枚举属性。
- 【优化】支持在 vConsole 的 DOM 容器内使用 `tap` 事件以代替 `click` 事件。
- `Feature` 支持逐级展开 Object 或 Array 的子元素。
- `Feature` 支持显示 Object 内的不可枚举属性。
- `Perf` 支持在 vConsole 的 DOM 容器内使用 `tap` 事件以代替 `click` 事件。

@@ -170,4 +180,4 @@

- 【特性】在 System 面板中添加完整的 performance timing 测速点。
- 【新增】在 README 中新增第三方插件列表。
- `Feature` 在 System 面板中添加完整的 performance timing 测速点。
- `Perf` 在 README 中新增第三方插件列表。

@@ -177,4 +187,4 @@

- 【特性】新增 `vConsole.version` 属性,以获取当前版本号。
- 【特性】新增 `XMLHttpRequest` 的 `xhr._noVConsole` 属性,以控制一个网络请求是否显示在 Network tab 中。
- `Feature` 新增 `vConsole.version` 属性,以获取当前版本号。
- `Feature` 新增 `XMLHttpRequest` 的 `xhr._noVConsole` 属性,以控制一个网络请求是否显示在 Network tab 中。

@@ -184,6 +194,6 @@

- 【特性】新增 `vConsole.tool` 及 `vConsole.$` 辅助函数,请查阅[辅助函数](./doc/helper_functions_CN.md)。
- 【特性】公开部分 vConsole 的属性及方法,请查阅[公共属性及方法](./doc/public_properties_methods_CN.md)。
- 【修复】修复 `window.onerror()` 中 `error` 可能为空而导致堆栈读取错误的问题。
- 【修复】修复当 `xhr.readyState < 4` 时读取 `xhr.status` 可能导致错误的问题。
- `Feature` 新增 `vConsole.tool` 及 `vConsole.$` 辅助函数,请查阅[辅助函数](./doc/helper_functions_CN.md)。
- `Feature` 公开部分 vConsole 的属性及方法,请查阅[公共属性及方法](./doc/public_properties_methods_CN.md)。
- `Fix` 修复 `window.onerror()` 中 `error` 可能为空而导致堆栈读取错误的问题。
- `Fix` 修复当 `xhr.readyState < 4` 时读取 `xhr.status` 可能导致错误的问题。

@@ -193,6 +203,6 @@

- 【修复】修复 vConsole 可能无法运行在 X5 内核浏览器的问题。
- 【修复】修复某些设备不支持 `localStorage` 的问题。
- 【修复】修复布尔值在 Log 面板展示不正确的问题。
- 【优化】优化在 Android 设备下的 UI 表现。
- `Fix` 修复 vConsole 可能无法运行在 X5 内核浏览器的问题。
- `Fix` 修复某些设备不支持 `localStorage` 的问题。
- `Fix` 修复布尔值在 Log 面板展示不正确的问题。
- `Perf` 优化在 Android 设备下的 UI 表现。

@@ -202,11 +212,11 @@

- 【特性】完全重构,支持自定义插件,请查阅[插件:入门](./doc/plugin_getting_started_CN.md)。
- 【特性】支持手动输入、执行命令行。
- 【特性】支持打印循环引用的对象。
- 【特性】支持在 Network 面板查看请求的 headers 和 response。
- 【优化】开关按钮不会再被拖出屏幕外部。
- 【优化】自动在 System 面板打印 User Agent。
- 【优化】打印 log 时会显示时间。
- 【修复】修复 getDate() 返回错误时间的问题。
- 【修复】修复同步 AJAX 变异步 AJAX 的问题。
- `Feature` 完全重构,支持自定义插件,请查阅[插件:入门](./doc/plugin_getting_started_CN.md)。
- `Feature` 支持手动输入、执行命令行。
- `Feature` 支持打印循环引用的对象。
- `Feature` 支持在 Network 面板查看请求的 headers 和 response。
- `Perf` 开关按钮不会再被拖出屏幕外部。
- `Perf` 自动在 System 面板打印 User Agent。
- `Perf` 打印 log 时会显示时间。
- `Fix` 修复 getDate() 返回错误时间的问题。
- `Fix` 修复同步 AJAX 变异步 AJAX 的问题。

@@ -219,8 +229,8 @@

- 【新增】支持拖拽右下角开关。
- 【修复】修复异步加载导致初始化失败的问题。
- `Feature` 支持拖拽右下角开关。
- `Fix` 修复异步加载导致初始化失败的问题。
#### v1.2.1 (2016-05-16)
- 【修复】修复发送 POST 请求时丢失数据的问题。
- `Fix` 修复发送 POST 请求时丢失数据的问题。

@@ -230,7 +240,7 @@

- 【新增】新增网络面板,可展示 AJAX 请求。
- 【删减】废弃 `vConsole.ready()` 方法。
- 【优化】支持 Object/Array 结构化展示,不再以 JSON 字符串输出。
- 【优化】新增英文 README 及 CHANGELOG 文档。
- 【优化】优化 UI 体验。
- `Feature` 新增网络面板,可展示 AJAX 请求。
- `Feature` 废弃 `vConsole.ready()` 方法。
- `Perf` 支持 Object/Array 结构化展示,不再以 JSON 字符串输出。
- `Perf` 新增英文 README 及 CHANGELOG 文档。
- `Perf` 优化 UI 体验。

@@ -240,4 +250,4 @@

- 【新增】支持 `window.onerror()` 的异常信息捕获。
- 【新增】支持 `[default|system|...]` 日志格式,将 log 输出到指定面板。
- `Feature` 支持 `window.onerror()` 的异常信息捕获。
- `Feature` 支持 `[default|system|...]` 日志格式,将 log 输出到指定面板。

@@ -247,4 +257,4 @@

- 【修复】修复 webpack 编译失败的问题。
- 【修复】修复打印 HTML 字符串可能导致的 XSS 问题。
- `Fix` 修复 webpack 编译失败的问题。
- `Fix` 修复打印 HTML 字符串可能导致的 XSS 问题。

@@ -254,4 +264,4 @@

- 【修复】修复 `package.json` 的 main 路径。
- 【优化】优化 example 的 demo 页面。
- `Fix` 修复 `package.json` 的 main 路径。
- `Perf` 优化 example 的 demo 页面。

@@ -258,0 +268,0 @@

English | [简体中文](./CHANGELOG_CN.md)
#### V3.4.1 (2021-04-09)
- `Feature(General)` Add `setSwitchPosition(x, y)` method to update the position of switch button, see [Public Properties & Methods](./doc/public_properties_methods.md) for more details.
- `Perf(General)` Add `Symbol` polyfill. (issue #361)
- `Fix(General)` Update theme style after `setOption()`.
- `Fix(General)` Remove `transitionEnd` to prevent compatibility issues. (issue #364)
- `Fix(Network)` Fix `fetch` optional parameter `init`. (issue #363, #365)
- `Fix(Network)` Fix XSS risks.
#### V3.4.0 (2021-01-14)
- [FEATURE] Add darkmode theme, see `vConsole.option.theme` in [Public Properties & Methods](./doc/public_properties_methods.md). (by @progrape)
- [FEATURE] Add `fetch` log in Network tab. (by @weiqian93)
- [FEATURE] Add Request Headers to Network tab.
- [FEATURE] Use short URL and display parameters in Network tab. (issue #291)
- [FEATURE] Add `Location` info to System tab. (issue #343)
- [FEATURE] Add safe area to switch button. (issue #353)
- [FEATURE] Auto move input cursor to the bracket after autocomplete command. (issue #293)
- [FEATURE] New plugin [vconsole-stats-plugin](https://github.com/smackgg/vConsole-Stats). (by @smackgg)
- [FIX] The position of the switch button will be reset by mistake when clicked.
- [FIX] Fix `document.documentElement.offsetHeight|offsetWidth` is unreliable in newer browsers. (by @littlee)
- [FIX] Prevent dispatchEvent for disabled or readOnly elements. (by @norux)
- [FIX] Fix nonce searching problem. (by @sunderls)
- [FIX] Fix security issues. (#345 by @QiAnXinCodeSafe)
- [FIX] Prevent "webkitStorageInfo deprecation" warning.
- [FIX] Remove `Symbol`, `Array.from` polyfill. (issue #325, #275)
- [FIX] Show all enumerable and unenumerable properties. (issue #327)
- [IMPROVE] Update Webpack DevServer option. (by @QinZhen001)
- `Feature(General)` Add darkmode theme, see `vConsole.option.theme` in [Public Properties & Methods](./doc/public_properties_methods.md). (by @progrape)
- `Feature(General)` Add safe area to switch button. (issue #353)
- `Feature(Log)` Auto move input cursor to the bracket after autocomplete command. (issue #293)
- `Feature(System)` Add `Location` info to System tab. (issue #343)
- `Feature(Network)` Add `fetch` log in Network tab. (by @weiqian93)
- `Feature(Network)` Add Request Headers to Network tab.
- `Feature(Network)` Use short URL and display parameters in Network tab. (issue #291)
- `Feature(Plugin)` New plugin [vconsole-stats-plugin](https://github.com/smackgg/vConsole-Stats). (by @smackgg)
- `Fix(General)` The position of the switch button will be reset by mistake when clicked.
- `Fix(General)` Fix `document.documentElement.offsetHeight|offsetWidth` is unreliable in newer browsers. (by @littlee)
- `Fix(General)` Prevent dispatchEvent for disabled or readOnly elements. (by @norux)
- `Fix(General)` Fix nonce searching problem. (by @sunderls)
- `Fix(General)` Fix security issues. (#345 by @QiAnXinCodeSafe)
- `Fix(General)` Prevent "webkitStorageInfo deprecation" warning.
- `Perf(General)` Remove `Symbol`, `Array.from` polyfill. (issue #325, #275)
- `Perf(General)` Show all enumerable and unenumerable properties. (issue #327)
- `Chore` Update Webpack DevServer option. (by @QinZhen001)

@@ -26,7 +36,7 @@

- [FEATURE] Add `%c` log format to support custom log style, see [Tutorial](./doc/tutorial.md) for more details.
- [FEATURE] Add `VConsole.VConsoleLogPlugin` (`VConsole.VConsole*` plugins etc.) to `VConsole` class.
- [IMPROVE] Display vConsole on `window DOMContentLoaded` instead of `window load`.
- [FIX] Fix remove cookie fail when it is set path=/ or top domain. (#264 by @qianxinfeng)
- [FIX] Fix a few minor issues. (#267 by @Molunerfinn, #272 by @domom)
- `Feature(Log)` Add `%c` log format to support custom log style, see [Tutorial](./doc/tutorial.md) for more details.
- `Feature(Plugin)` Add `VConsole.VConsoleLogPlugin` (`VConsole.VConsole*` plugins etc.) to `VConsole` class.
- `Fix(General)` Fix a few minor issues. (#267 by @Molunerfinn, #272 by @domom)
- `Fix(Storage)` Fix remove cookie fail when it is set path=/ or top domain. (#264 by @qianxinfeng)
- `Perf(General)` Display vConsole on `window DOMContentLoaded` instead of `window load`.

@@ -36,6 +46,6 @@

- [FEATURE] Add TypeScript definition file. (by @jas0ncn)
- [FIX] Fix switch button position issue. (by @rexschuang)
- [FIX] Avoid scrolling to bottom when away from bottom edge. (by @ele828)
- [FIX] Fix a few minor issues. (by @stenders)
- `Feature(General)` Add TypeScript definition file. (by @jas0ncn)
- `Fix(Log)` Avoid scrolling to bottom when away from bottom edge. (by @ele828)
- `Fix(General)` Fix switch button position issue. (by @rexschuang)
- `Fix(General)` Fix a few minor issues. (by @stenders)

@@ -45,4 +55,4 @@

- [FEATURE] Add the ability to collapse the same log.
- [FIX] Fix issue which formatted log (like `console.log('[foo]', 'bar')`) will not display in Log tab.
- `Feature(Log)` Add the ability to collapse the same log.
- `Fix(Log)` Fix issue which formatted log (like `console.log('[foo]', 'bar')`) will not display in Log tab.

@@ -52,10 +62,10 @@

- [FEATURE] Add console command prompt. (by @65147400)
- [FEATURE] Add SessionStorage support in Storage tab. (by @hkc452)
- [FIX] Fix `JSON.stringify` function which was incorrectly rewritten.
- [FIX] Fix `logNumber` bug which was not reset when clear logs. (by @liuyuekeng)
- [FIX] Fix unencoded HTML tag in Network tab. (by @mokang)
- [FIX] Fix possible crash when decode content in Storage tab. (by @wolfsilver)
- [FIX] Fix CSP buy cause by `nonce` attribute. (by @scotthuang)
- [IMPROVE] Add bottom safe area to adapt to full screen such as iPhone X. (by @dingyi1993)
- `Feature` Add console command prompt. (by @65147400)
- `Feature` Add SessionStorage support in Storage tab. (by @hkc452)
- `Fix` Fix `JSON.stringify` function which was incorrectly rewritten.
- `Fix` Fix `logNumber` bug which was not reset when clear logs. (by @liuyuekeng)
- `Fix` Fix unencoded HTML tag in Network tab. (by @mokang)
- `Fix` Fix possible crash when decode content in Storage tab. (by @wolfsilver)
- `Fix` Fix CSP buy cause by `nonce` attribute. (by @scotthuang)
- `Perf` Add bottom safe area to adapt to full screen such as iPhone X. (by @dingyi1993)

@@ -65,7 +75,7 @@

- [FEATURE] Support `console.time()` and `console.timeEnd()`.
- [FEATRUE] Add `disableLogScrolling` (in `vConsole.option`).
- [FIX] Fix `setOption()` error.
- [FIX] Fix cookies' value wrong display.
- [FIX] Fix "Uncaught InvalidStateError". (by @fireyy)
- `Feature` Support `console.time()` and `console.timeEnd()`.
- `Feature` Add `disableLogScrolling` (in `vConsole.option`).
- `Fix` Fix `setOption()` error.
- `Fix` Fix cookies' value wrong display.
- `Fix` Fix "Uncaught InvalidStateError". (by @fireyy)

@@ -75,7 +85,7 @@

- [FEATURE] Add `vConsole.showSwitch()` and `vConsole.hideSwitch()` methods, see [Public Properties & Methods](./doc/public_properties_methods.md).
- [FEATURE] Add `onReady` and `onClearLog` callback function to `vConsole.option`.
- [FEATURE] Auto clear logs when `console.clear()` is called.
- [FIX] Fix `\r` error when build in Windows.
- [FIX] Fix `Symbol` error in iOS8 or other old OS.
- `Feature` Add `vConsole.showSwitch()` and `vConsole.hideSwitch()` methods, see [Public Properties & Methods](./doc/public_properties_methods.md).
- `Feature` Add `onReady` and `onClearLog` callback function to `vConsole.option`.
- `Feature` Auto clear logs when `console.clear()` is called.
- `Fix` Fix `\r` error when build in Windows.
- `Fix` Fix `Symbol` error in iOS8 or other old OS.

@@ -87,27 +97,27 @@

- [FEATRUE] Require manual init vConsole `var vConsole = new VConsole(option)`.
- [FEATRUE] Add configuaration `vConsole.option`, which can be set when `new VConsole` or `setOption(key, value)`.
- [FEATURE] Support for custom loading of default built-in plugins by using `defaultPlugins` in the above option.
- [FEATURE] Add `setOption(key, value)` method.
- [IMPROVE] Support CSP rule `unsafe-eval` and `unsafe-inline`.
- [IMPROVE] Optimize `font-size` when `initial-scale < 1`.
- `Feature` Require manual init vConsole `var vConsole = new VConsole(option)`.
- `Feature` Add configuaration `vConsole.option`, which can be set when `new VConsole` or `setOption(key, value)`.
- `Feature` Support for custom loading of default built-in plugins by using `defaultPlugins` in the above option.
- `Feature` Add `setOption(key, value)` method.
- `Perf` Support CSP rule `unsafe-eval` and `unsafe-inline`.
- `Perf` Optimize `font-size` when `initial-scale < 1`.
Log plugin:
- [FEATURE] Support `maxLogNumber` option to limit maximum log number.
- [FIX] Fix the crash caused by printing large objects.
- [IMPROVE] Only the logs written as `console.log('[system]', xxx)` will be shown in System tab, so `console.log('[system] xxx')` will be shown in default log tab.
- `Feature` Support `maxLogNumber` option to limit maximum log number.
- `Fix` Fix the crash caused by printing large objects.
- `Perf` Only the logs written as `console.log('[system]', xxx)` will be shown in System tab, so `console.log('[system] xxx')` will be shown in default log tab.
Network plugin:
- [FEATURE] Support `Query String Parameters` and `Form Data`.
- [IMPROVE] Auto format JSON response.
- [FIX] Fix bug that XHR status is always "Pending" when using 3rd HTTP libraries.
- `Feature` Support `Query String Parameters` and `Form Data`.
- `Perf` Auto format JSON response.
- `Fix` Fix bug that XHR status is always "Pending" when using 3rd HTTP libraries.
Plugins:
- [FEATURE] Plugins can get vConsole instance by `this.vConsole` on/after `init` event is called.
- [FEATURE] Add `updateOption` event to detect `vConsole.option` changes.
- [FEATURE] Add Element tab as a built-in plugin.
- [FEATURE] Add Storage tab as a built-in plugin.
- `Feature` Plugins can get vConsole instance by `this.vConsole` on/after `init` event is called.
- `Feature` Add `updateOption` event to detect `vConsole.option` changes.
- `Feature` Add Element tab as a built-in plugin.
- `Feature` Add Storage tab as a built-in plugin.

@@ -120,3 +130,3 @@

- [FIX] Catch errors when eval custom commands in Log tab.
- `Fix` Catch errors when eval custom commands in Log tab.

@@ -126,5 +136,5 @@

- [FIX] Fix `scrollHeight` error in some cases.
- [FIX] Fix flex layout in iOS 8 devices.
- [IMPROVE] Performance enhancement.
- `Fix` Fix `scrollHeight` error in some cases.
- `Fix` Fix flex layout in iOS 8 devices.
- `Perf` Performance enhancement.

@@ -134,6 +144,6 @@

- [FEATURE] Add `vConsole.removePlugin()` method, see [Public Properties & Methods](./doc/public_properties_methods.md).
- [FEATURE] Add `remove` plugin event, see [Plugin: Event List](./doc/plugin_event_list.md).
- [IMPROVE] Disable page scrolling while vConsole is scrolling.
- [FIX] Fix `window.onerror()` typo.
- `Feature` Add `vConsole.removePlugin()` method, see [Public Properties & Methods](./doc/public_properties_methods.md).
- `Feature` Add `remove` plugin event, see [Plugin: Event List](./doc/plugin_event_list.md).
- `Perf` Disable page scrolling while vConsole is scrolling.
- `Fix` Fix `window.onerror()` typo.

@@ -143,8 +153,8 @@

- [FEATURE] Add `addTopBar` plugin event, see [Plugin: Event List](./doc/plugin_event_list.md).
- [FEATURE] Add log type filter to Log & System tab.
- [IMPROVE] Log list will not automatically scroll to bottom while printing new logs if the viewport is not at the end of list.
- [IMPROVE] Fix UI bugs.
- [FIX] Fix XSS issue when print object logs.
- [FIX] Switch button will not be positioned out of edges in some special cases.
- `Feature` Add `addTopBar` plugin event, see [Plugin: Event List](./doc/plugin_event_list.md).
- `Feature` Add log type filter to Log & System tab.
- `Perf` Log list will not automatically scroll to bottom while printing new logs if the viewport is not at the end of list.
- `Perf` Fix UI bugs.
- `Fix` Fix XSS issue when print object logs.
- `Fix` Switch button will not be positioned out of edges in some special cases.

@@ -154,4 +164,4 @@

- [FIX] Replace custom `tap` event (in V2.3.0) with `click` event (still support fast response) to prevent conflicts.
- [IMPROVE] Remove `now` item and add `navigationStart` time in System tab.
- `Fix` Replace custom `tap` event (in V2.3.0) with `click` event (still support fast response) to prevent conflicts.
- `Perf` Remove `now` item and add `navigationStart` time in System tab.

@@ -161,5 +171,5 @@

- [FEATURE] Objects or Arrays can be expended layer by layer.
- [FEATURE] All object's properties, including private properties, can be enumerable now.
- [IMPROVE] Support `tap` event within vConsole's DOM container to speed up `click` event.
- `Feature` Objects or Arrays can be expended layer by layer.
- `Feature` All object's properties, including private properties, can be enumerable now.
- `Perf` Support `tap` event within vConsole's DOM container to speed up `click` event.

@@ -169,4 +179,4 @@

- [IMPROVE] Add complete performance timing log to System tab.
- [ADD] Add third-party plugin list to README.
- `Perf` Add complete performance timing log to System tab.
- `Feature` Add third-party plugin list to README.

@@ -176,4 +186,4 @@

- [FEATURE] Add `vConsole.version` property.
- [FEATURE] Add `xhr._noVConsole` property to `XMLHttpRequest` objects to customize whether a XHR should display in Network tab.
- `Feature` Add `vConsole.version` property.
- `Feature` Add `xhr._noVConsole` property to `XMLHttpRequest` objects to customize whether a XHR should display in Network tab.

@@ -183,6 +193,6 @@

- [FEATURE] Add `vConsole.tool` & `vConsole.$` helper functions, see [Helper Functions](./doc/helper_functions.md).
- [FEATURE] Public properties & methods of vConsole are available, see [Public Properties & Methods](./doc/public_properties_methods.md).
- [FIX] Fix issue that `error` in `window.onerror()` may be undefined.
- [FIX] Fix error that `xhr.status` may be unavailable when `xhr.readyState < 4`.
- `Feature` Add `vConsole.tool` & `vConsole.$` helper functions, see [Helper Functions](./doc/helper_functions.md).
- `Feature` Public properties & methods of vConsole are available, see [Public Properties & Methods](./doc/public_properties_methods.md).
- `Fix` Fix issue that `error` in `window.onerror()` may be undefined.
- `Fix` Fix error that `xhr.status` may be unavailable when `xhr.readyState < 4`.

@@ -192,6 +202,6 @@

- [FIX] Fix error that vConsole may not work at X5 browser engine.
- [FIX] Fix error that `localStorage` is null in some kind of devices.
- [FIX] Fix boolean display error in Log tab.
- [IMPROVE] Improve UI in Android.
- `Fix` Fix error that vConsole may not work at X5 browser engine.
- `Fix` Fix error that `localStorage` is null in some kind of devices.
- `Fix` Fix boolean display error in Log tab.
- `Perf` Improve UI in Android.

@@ -201,11 +211,11 @@

- [FEATURE] Rebuild completely, support custom plugin, see [Plugin: Getting Started](./doc/plugin_getting_started.md).
- [FEATURE] Support execute JS command line in Log tab.
- [FEATURE] Support circular structure object in Log and System tab.
- [FEATURE] Support viewing request headers and response in Network tab.
- [IMPROVE] Switch button will not be dragged out of screen.
- [IMPROVE] Auto print User Agent in System tab.
- [IMPROVE] Show log's time in Log and System tab.
- [FIX] Fix issue that getDate() returns a wrong date.
- [FIX] Fix issue that sync AJAX becomes async AJAX.
- `Feature` Rebuild completely, support custom plugin, see [Plugin: Getting Started](./doc/plugin_getting_started.md).
- `Feature` Support execute JS command line in Log tab.
- `Feature` Support circular structure object in Log and System tab.
- `Feature` Support viewing request headers and response in Network tab.
- `Perf` Switch button will not be dragged out of screen.
- `Perf` Auto print User Agent in System tab.
- `Perf` Show log's time in Log and System tab.
- `Fix` Fix issue that getDate() returns a wrong date.
- `Fix` Fix issue that sync AJAX becomes async AJAX.

@@ -218,4 +228,4 @@

- [ADD] Support Drag and Drop switch button.
- [FIX] Fix initialization failure when loaded asynchronously.
- `Feature` Support Drag and Drop switch button.
- `Fix` Fix initialization failure when loaded asynchronously.

@@ -225,3 +235,3 @@

- [FIX] Fix data lost when sending a POST request.
- `Fix` Fix data lost when sending a POST request.

@@ -231,7 +241,7 @@

- [ADD] Add network panel.
- [DELELE] Deprecate `vConsole.ready()` method.
- [IMPROVE] Display formatted Object & Array variable.
- [IMPROVE] Add English README and CHANGELOG.
- [IMPROVE] Improve UI.
- `Feature` Add network panel.
- `Feature` Deprecate `vConsole.ready()` method.
- `Perf` Display formatted Object & Array variable.
- `Perf` Add English README and CHANGELOG.
- `Perf` Improve UI.

@@ -241,4 +251,4 @@

- [ADD] Support `window.onerror()` to catch exceptions and errors.
- [ADD] Support `[default|system|...]` string to print logs to specific panel.
- `Feature` Support `window.onerror()` to catch exceptions and errors.
- `Feature` Support `[default|system|...]` string to print logs to specific panel.

@@ -248,4 +258,4 @@

- [FIX] Fix webpack compilation.
- [FIX] Fix XSS when printing HTML string.
- `Fix` Fix webpack compilation.
- `Fix` Fix XSS when printing HTML string.

@@ -255,4 +265,4 @@

- [FIX] Fix the `main` path in `package.json`.
- [IMPROVE] Update demo pages.
- `Fix` Fix the `main` path in `package.json`.
- `Perf` Update demo pages.

@@ -259,0 +269,0 @@

@@ -1,1 +0,1 @@

{"ret":0,"msg":"suc"}
{"ret":0,"msg":"suc","xss":"<xss0>XSS"}

@@ -111,2 +111,20 @@ 公共属性及方法

### vConsole.setSwitchPosition(x, y)
设置开关按钮的位置。
##### 参数:
- (required) x: X 坐标,坐标原点位于屏幕右下角。
- (required) y: Y 坐标,坐标原点位于屏幕右下角。
##### 返回:
- 无
##### 例子:
```javascript
vConsole.setSwitchPosition(20, 20);
```
### vConsole.destroy()

@@ -113,0 +131,0 @@

@@ -19,3 +19,3 @@ Public Properties & Methods

```javascript
vConsole.version // => "3.4.0"
vConsole.version // => "3.4.1"
```

@@ -112,2 +112,20 @@

### vConsole.setSwitchPosition(x, y)
Update the position of switch button.
##### Parameters:
- (required) x: X coordinate, the origin of the coordinate is at the bottom right corner of the screen.
- (required) y: Y coordinate, the origin of the coordinate is at the bottom right corner of the screen.
##### Return:
- None
##### Example:
```javascript
vConsole.setSwitchPosition(20, 20);
```
### vConsole.destroy()

@@ -114,0 +132,0 @@

{
"name": "vconsole",
"version": "3.4.0",
"version": "3.4.1",
"description": "A lightweight, extendable front-end developer tool for mobile web page.",

@@ -23,4 +23,4 @@ "homepage": "https://github.com/Tencent/vConsole",

"dependencies": {
"mutation-observer": "^1.0.3",
"transitionEnd": "^1.0.2"
"core-js": "^3.8.3",
"mutation-observer": "^1.0.3"
},

@@ -27,0 +27,0 @@ "devDependencies": {

@@ -158,7 +158,3 @@ /*

switchY = tool.getStorage('switch_y') * 1;
[switchX, switchY] = this._getSwitchButtonSafeAreaXY($switch, switchX, switchY);
this.switchPos.x = switchX;
this.switchPos.y = switchY;
$.one('.vc-switch').style.right = switchX + 'px';
$.one('.vc-switch').style.bottom = switchY + 'px';
this.setSwitchPosition(switchX, switchY);

@@ -180,6 +176,43 @@ // modify font-size

// set theme
if (this.option.theme) {
this.$dom.setAttribute('data-theme', this.option.theme);
this._updateTheme();
}
/**
* Update theme
* @private
*/
_updateTheme() {
const theme = this.option.theme || 'light';
this.$dom.setAttribute('data-theme', theme);
}
setSwitchPosition(switchX, switchY) {
const $switch = $.one('.vc-switch', this.$dom);
[switchX, switchY] = this._getSwitchButtonSafeAreaXY($switch, switchX, switchY);
this.switchPos.x = switchX;
this.switchPos.y = switchY;
$switch.style.right = switchX + 'px';
$switch.style.bottom = switchY + 'px';
tool.setStorage('switch_x', switchX);
tool.setStorage('switch_y', switchY);
}
/**
* Get an safe [x, y] position for switch button
* @private
*/
_getSwitchButtonSafeAreaXY($switch, x, y) {
const docWidth = Math.max(document.documentElement.offsetWidth, window.innerWidth);
const docHeight = Math.max(document.documentElement.offsetHeight, window.innerHeight);
// check edge
if (x + $switch.offsetWidth > docWidth) {
x = docWidth - $switch.offsetWidth;
}
};
if (y + $switch.offsetHeight > docHeight) {
y = docHeight - $switch.offsetHeight;
}
if (x < 0) { x = 0; }
if (y < 20) { y = 20; } // safe area for iOS Home indicator
return [x, y];
}

@@ -299,9 +332,6 @@ /**

}
that.switchPos.x = that.switchPos.endX;
that.switchPos.y = that.switchPos.endY;
that.switchPos.startX = 0;
that.switchPos.startY = 0;
that.switchPos.hasMoved = false;
tool.setStorage('switch_x', that.switchPos.x);
tool.setStorage('switch_y', that.switchPos.y);
that.setSwitchPosition(that.switchPos.endX, that.switchPos.endY);
});

@@ -322,3 +352,2 @@ $.bind($switch, 'touchmove', function(e) {

that.switchPos.hasMoved = true;
console.log(x, y);
e.preventDefault();

@@ -366,19 +395,2 @@ });

// after console panel, trigger a transitionend event to make panel's property 'display' change from 'block' to 'none'
const onPanelTransitionEnd = function(target) {
if (!$.hasClass(that.$dom, 'vc-toggle')) {
target.style.display = 'none';
}
}
if (transitionEnd) {
$.bind($panel, transitionEnd, function(e) {
if (e.target != $panel) {
return false;
}
onPanelTransitionEnd(e.target);
});
} else {
onPanelTransitionEnd($panel);
}
// disable background scrolling

@@ -679,2 +691,7 @@ let $content = $.one('.vc-content', that.$dom);

$.removeClass(this.$dom, 'vc-toggle');
setTimeout(() => {
// panel will be hidden by CSS transition in 0.3s
$.one('.vc-mask', this.$dom).style.display = 'none';
$.one('.vc-panel', this.$dom).style.display = 'none';
}, 330);
this._triggerPluginsEvent('hideConsole');

@@ -746,2 +763,3 @@ }

this._triggerPluginsEvent('updateOption');
this._updateTheme();
} else if (tool.isObject(keyOrObj)) {

@@ -752,2 +770,3 @@ for (let k in keyOrObj) {

this._triggerPluginsEvent('updateOption');
this._updateTheme();
} else {

@@ -754,0 +773,0 @@ console.debug('The first parameter of vConsole.setOption() must be a string or an object.');

@@ -14,3 +14,12 @@ /**

match = [];
let addCode = function(line, isJS) {
const RenderFunction = {
// escape HTML to text
text: (str) => {
if (typeof str !== 'string' && typeof str !== 'number') { return str; }
return String(str).replace(/[<>&" ]/g, (c) => {
return { '<': '&lt;', '>': '&gt;', '&': '&amp;', '"': '&quot;', ' ': '&nbsp;' }[c];
});
},
};
const addCode = (line, isJS) => {
if (line === '') { return; }

@@ -54,2 +63,6 @@ // console.log(line)

code = 'var arr = [];\n';
// renderFunctions
for (let fn in RenderFunction) {
code += `var ${fn} = ${RenderFunction[fn].toString()};\n`;
}
while (match = pattern.exec(tpl)) {

@@ -56,0 +69,0 @@ addCode( tpl.slice(pointer, match.index), false );

@@ -432,7 +432,7 @@ /*

mockFetch() {
let _fetch = window.fetch;
if (!_fetch){ return; }
let that = this;
const _fetch = window.fetch;
if (!_fetch) { return; }
const that = this;
let prevFetch = (input, init) => {
const prevFetch = (input, init) => {
let id = that.getUniqueID();

@@ -448,5 +448,5 @@ that.reqList[id] = {};

if (tool.isString(input)) { // when `input` is a string
method = init.method || 'GET';
method = init?.method || 'GET';
url = input;
requestHeader = init.headers;
requestHeader = init?.headers || null;
} else { // when `input` is a `Request` object

@@ -466,2 +466,11 @@ method = input.method || 'GET';

if (Object.prototype.toString.call(requestHeader) === '[object Headers]') {
item.requestHeader = {};
for (let pair of requestHeader.entries()) {
item.requestHeader[pair[0]] = pair[1];
}
} else {
item.requestHeader = requestHeader;
}
if (query.length > 0) {

@@ -480,3 +489,3 @@ item.name += '?' + query;

if (tool.isString(input)) { // when `input` is a string
if (tool.isString(init.body)) {
if (tool.isString(init?.body)) {
let arr = init.body.split('&');

@@ -488,4 +497,4 @@ item.postData = {};

}
} else if (tool.isPlainObject(init.body)) {
item.postData = init.body;
} else if (tool.isPlainObject(init?.body)) {
item.postData = init?.body;
} else {

@@ -492,0 +501,0 @@ item.postData = '[object Object]';

@@ -16,2 +16,5 @@ /*

// polyfill
import 'core-js/stable/symbol';
// classes

@@ -18,0 +21,0 @@ import VConsole from './core/core.js';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc