Skip to content

Commit

Permalink
导出函数
Browse files Browse the repository at this point in the history
  • Loading branch information
Caramel-Diode authored Jul 31, 2024
1 parent 46dd79c commit dee69fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/yd_download.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @param {String} [filename] 文件名 默认使用页面标题
* @param {Boolean} [isURL] 传入的字符串是否为下载链接。(否则将作为文本内容下载) 默认为`false`
*/
const yd_download = (content, filename = document.title, isURL = "false") => {
export const yd_download = (content, filename = document.title, isURL = "false") => {
if (content === void 0 || content === null) throw new TypeError("无下载内容!");
const anchor = document.createElement("a");
// 将数值类型与布尔类型转为字符串
Expand Down

0 comments on commit dee69fd

Please sign in to comment.