UNPKG

@cch137/format-utils

Version:

A collection of utility modules for formatting and processing data

63 lines (32 loc) 1.07 kB
# Format Utils 開發 by cch137 ## 模塊 ### `date` - 提供 `Date` 格式化功能。 ### `deep-equal` - 提供 `deep-equal` 深度比較功能。 ### `bytes` - 提供數值轉 bytes 格式化功能。 ### `numeric-compare` - 將文字數值化比較,能夠比較多個數值部分,例如:`a1-1`, `a1-11`### `fetch2` 提供原生函式 `fetch` 的改良版(自動選用 TextDecoder)。 ### `safe-filename` 將字符串轉換為合法的文件命名格式。 ### `bigmap` - 功能與 JS 原生的 Map 完全相同,但是沒有大小限制。 ### `objects` - 支援各種對物件的操作與 Type。 ### `read-stream` - 提供同步函式將 stream 轉換成多種格式(`Uint8Array``string`)。 -`Uint8Array` 轉換為 `ReadableStream`### `server` - 提供 `getRequestIp`### `sleep` - 提供 `sleep`### `detect-languages` - 偵測文本語言。 ### `urls` - 提取文本鏈接。 ### `youtube` - 與 YouTube 鏈接相關的功能。