dozy 1.0.78 → 1.0.79
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/dist/index.d.ts +24 -6
- package/dist/index.js +14 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -552,17 +552,35 @@ declare function isNowAroundUtcHour(targetHour: number): boolean;
|
|
|
552
552
|
*/
|
|
553
553
|
declare function $purifyBase64(input: string | Null): string | null;
|
|
554
554
|
/**
|
|
555
|
-
* 基于“纯 base64
|
|
555
|
+
* 基于“纯 base64”推断文件 mime 类型。
|
|
556
556
|
*
|
|
557
557
|
* 说明:
|
|
558
|
-
* -
|
|
558
|
+
* - 图片:jpeg/png/gif/webp/bmp/tiff/avif/heic/x-icon/svg+xml。
|
|
559
|
+
* - 音频:mpeg(mp3)/wav/ogg/flac/aac/m4a。
|
|
560
|
+
* - 视频:mp4/webm/quicktime(mov)/x-msvideo(avi)/x-matroska(mkv)。
|
|
561
|
+
* - 文档:pdf/msword(doc)/vnd.ms-excel(xls)/vnd.ms-powerpoint(ppt)/
|
|
562
|
+
* vnd.openxmlformats-officedocument.*(docx/xlsx/pptx)。
|
|
563
|
+
* - 压缩包:zip/x-rar-compressed/x-7z-compressed/gzip/x-tar。
|
|
564
|
+
* - 其它:xml。
|
|
559
565
|
* - 输入可为纯 base64 或 data URL,内部会先清洗。
|
|
560
|
-
* - 无法识别时回退为 `
|
|
566
|
+
* - 无法识别时回退为 `application/octet-stream`。
|
|
561
567
|
*
|
|
562
568
|
* 返回值约定:
|
|
563
569
|
* - 一定返回非空 mime 字符串(不会返回 null/undefined/空串)。
|
|
564
570
|
*/
|
|
565
|
-
declare function $inferMimeTypeFormPureBase64(pureBase64: string | Null): "image/
|
|
571
|
+
declare function $inferMimeTypeFormPureBase64(pureBase64: string | Null): "application/xml" | "image/svg+xml" | "application/octet-stream" | "image/jpeg" | "image/png" | "image/gif" | "image/bmp" | "image/tiff" | "image/x-icon" | "image/webp" | "audio/wav" | "video/x-msvideo" | "image/avif" | "image/heic" | "video/quicktime" | "audio/mp4" | "video/mp4" | "video/webm" | "video/x-matroska" | "audio/ogg" | "audio/flac" | "audio/mpeg" | "audio/aac" | "application/pdf" | "application/x-cfb" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/zip" | "application/x-rar-compressed" | "application/x-7z-compressed" | "application/gzip" | "application/x-tar";
|
|
572
|
+
/**
|
|
573
|
+
* 基于“纯 base64”推断文件后缀。
|
|
574
|
+
*
|
|
575
|
+
* 说明:
|
|
576
|
+
* - 覆盖 `$inferMimeTypeFormPureBase64` 支持的全部类型。
|
|
577
|
+
* - 输入可为纯 base64 或 data URL,内部会先清洗。
|
|
578
|
+
* - 无法识别时回退为 `bin`。
|
|
579
|
+
*
|
|
580
|
+
* 返回值约定:
|
|
581
|
+
* - 一定返回非空后缀字符串(不含点号,不会返回 null/undefined/空串)。
|
|
582
|
+
*/
|
|
583
|
+
declare function $inferExtensionFormPureBase64(pureBase64: string | Null): "xml" | "jpg" | "png" | "gif" | "bmp" | "svg" | "webp" | "mp3" | "wav" | "ogg" | "aac" | "flac" | "m4a" | "mp4" | "webm" | "mov" | "avi" | "mkv" | "avif" | "heic" | "tiff" | "ico" | "pdf" | "doc" | "docx" | "xlsx" | "pptx" | "zip" | "rar" | "7z" | "gz" | "tar" | "bin";
|
|
566
584
|
/**
|
|
567
585
|
* 将“纯 base64 或 data URL”统一转成标准 data URL。
|
|
568
586
|
*
|
|
@@ -1377,6 +1395,6 @@ declare function toRgbString(input: string | Color | any): string | undefined;
|
|
|
1377
1395
|
*/
|
|
1378
1396
|
declare function toHslString(input: string | Color | any): string | undefined;
|
|
1379
1397
|
|
|
1380
|
-
declare const DOZY = "1.0.
|
|
1398
|
+
declare const DOZY = "1.0.79";
|
|
1381
1399
|
|
|
1382
|
-
export { $Headers, $Request, $Response, $URL, $URLSearchParams, $arrayFrom, $arrayIsArray, $assign, $backgroundColor, $borderColor, $capitalize, $checkValidEmailWithUnicode, $clamp, $clearInterval, $clearTimeout, $clone, $compressImage, $compressImageBase64, $compressImageDefaultOptions, $copy, $crypto, $date, $decodeBase64ToBinary, $decodeBase64ToUnicode, $deepClone, $defineProperty, $document, $encodeUnicodeToBase64, $entries, $escapeHTML, $fallbackCopy, $fetch, $fileToBase64, $formatDate, $formatPoints, $formatPointsWithChange, $formatWithCommas, $freeze, $genSSF, $getFileType, $getHue, $getTimeString, $hasKey, $if, $inRange, $inRange2, $inferMimeTypeFormPureBase64, $is, $isObject, $isPlainClass, $isValidEmailWithUnicode, $isValidOrBriefURL, $jsonParse, $jsonStringify, $keys, $lastIndex, $lindex, $loadOpt, $location, $log, $lplus, $magic, $math, $now, $numberIsFinite, $numberIsNaN, $oc, $open, $parseParams, $promise, $pureText, $purifyBase64, $randomByte, $replaceHolesWithUndefined, $rmvSlash, $rsValue, $rsetValue, $rvalue, $s, $sc, $setInterval, $setRange, $setTimeout, $stringFromCharCode, $stringFromCodePoint, $stringToRange, $strings, $toDataUrlFromBase64, $validName, $values, $window, type Any, type Atoa, type Coord, type Coord3, DOZY, type DozyConfig, type DozyConfigItem, type FileType, Gens, type Hel, type IOpt, type Items, type Null, type Nullable, RainbowGen, RepoStore, type ScaleComputer, type ScaleIniter, StringObfuscator, type UNumber, __GensDirectives, _res, boxShadow, dozy, enableScaler, err403, errArg, errCode, errContent, errMsg, errNotLoggedIn, errToString, getBrightness, getColorMap, isNowAroundUtcHour, isNull, isValidColor, maybeString, registerCustomColor, s, shanghaiDateFormatter, smallChance, smartParse, smartString, standardIniter, textShadow, toHexString, toHslString, toRgbString, toRgbaArray, web$enableHttpsRedirect, web$enableProdProtector, web$encodeURI, web$pathStartData, web$redirectToDomain, web$setPathTarget, xtrim };
|
|
1400
|
+
export { $Headers, $Request, $Response, $URL, $URLSearchParams, $arrayFrom, $arrayIsArray, $assign, $backgroundColor, $borderColor, $capitalize, $checkValidEmailWithUnicode, $clamp, $clearInterval, $clearTimeout, $clone, $compressImage, $compressImageBase64, $compressImageDefaultOptions, $copy, $crypto, $date, $decodeBase64ToBinary, $decodeBase64ToUnicode, $deepClone, $defineProperty, $document, $encodeUnicodeToBase64, $entries, $escapeHTML, $fallbackCopy, $fetch, $fileToBase64, $formatDate, $formatPoints, $formatPointsWithChange, $formatWithCommas, $freeze, $genSSF, $getFileType, $getHue, $getTimeString, $hasKey, $if, $inRange, $inRange2, $inferExtensionFormPureBase64, $inferMimeTypeFormPureBase64, $is, $isObject, $isPlainClass, $isValidEmailWithUnicode, $isValidOrBriefURL, $jsonParse, $jsonStringify, $keys, $lastIndex, $lindex, $loadOpt, $location, $log, $lplus, $magic, $math, $now, $numberIsFinite, $numberIsNaN, $oc, $open, $parseParams, $promise, $pureText, $purifyBase64, $randomByte, $replaceHolesWithUndefined, $rmvSlash, $rsValue, $rsetValue, $rvalue, $s, $sc, $setInterval, $setRange, $setTimeout, $stringFromCharCode, $stringFromCodePoint, $stringToRange, $strings, $toDataUrlFromBase64, $validName, $values, $window, type Any, type Atoa, type Coord, type Coord3, DOZY, type DozyConfig, type DozyConfigItem, type FileType, Gens, type Hel, type IOpt, type Items, type Null, type Nullable, RainbowGen, RepoStore, type ScaleComputer, type ScaleIniter, StringObfuscator, type UNumber, __GensDirectives, _res, boxShadow, dozy, enableScaler, err403, errArg, errCode, errContent, errMsg, errNotLoggedIn, errToString, getBrightness, getColorMap, isNowAroundUtcHour, isNull, isValidColor, maybeString, registerCustomColor, s, shanghaiDateFormatter, smallChance, smartParse, smartString, standardIniter, textShadow, toHexString, toHslString, toRgbString, toRgbaArray, web$enableHttpsRedirect, web$enableProdProtector, web$encodeURI, web$pathStartData, web$redirectToDomain, web$setPathTarget, xtrim };
|