@@ -227,12 +227,12 @@ Creates a partially applied function with preset options.
227227
228228``` mermaid
229229graph TD
230- Input[filesize(1536, options)] --> Format{Output Format}
230+ Input[" filesize(1536, options)" ] --> Format{Output Format}
231231
232- Format -->|string| String["1.5 KB"]
233- Format -->|array| Array["[ 1.5, 'KB'] "]
234- Format -->|object| Object["{value: 1.5 , symbol: 'KB' , exponent: 1 , unit: 'KB'} "]
235- Format -->|exponent| Exp["1"]
232+ Format -->|string| String["String: ' 1.5 KB' "]
233+ Format -->|array| Array["Array: 1.5, 'KB'"]
234+ Format -->|object| Object["Object: value , symbol, exponent, unit"]
235+ Format -->|exponent| Exp["Number: 1"]
236236
237237 style Input fill:#166534,stroke:#15803d,stroke-width:2px,color:#ffffff
238238 style String fill:#d97706,stroke:#b45309,stroke-width:2px,color:#ffffff
@@ -241,6 +241,23 @@ graph TD
241241 style Exp fill:#166534,stroke:#15803d,stroke-width:2px,color:#ffffff
242242```
243243
244+ #### Output Format Examples
245+
246+ ``` javascript
247+ // String output (default)
248+ filesize (1536 ) // "1.5 KB"
249+
250+ // Array output
251+ filesize (1536 , { output: " array" }) // [1.5, "KB"]
252+
253+ // Object output
254+ filesize (1536 , { output: " object" })
255+ // { value: 1.5, symbol: "KB", exponent: 1, unit: "KB" }
256+
257+ // Exponent output
258+ filesize (1536 , { output: " exponent" }) // 1
259+ ```
260+
244261## Usage Patterns
245262
246263### Basic Usage
@@ -560,19 +577,19 @@ export function SystemMetrics() {
560577``` mermaid
561578graph TB
562579 subgraph "Locale Processing"
563- A[Input Locale] --> B{Locale Type}
564- B -->|true| C[System Locale]
565- B -->|string| D[Specific Locale]
566- B -->|empty| E[No Localization]
580+ A[" Input Locale" ] --> B{" Locale Type" }
581+ B -->|" true" | C[" System Locale" ]
582+ B -->|" string" | D[" Specific Locale" ]
583+ B -->|" empty" | E[" No Localization" ]
567584
568- C --> F[navigator.language]
569- D --> G[Custom Locale]
570- F --> H[toLocaleString()]
585+ C --> F[" navigator.language" ]
586+ D --> G[" Custom Locale" ]
587+ F --> H[" toLocaleString()" ]
571588 G --> H
572589
573- H --> I[Formatted Number]
574- E --> J[toString()]
575- J --> K[Apply Custom Separator]
590+ H --> I[" Formatted Number" ]
591+ E --> J[" toString()" ]
592+ J --> K[" Apply Custom Separator" ]
576593 end
577594
578595 style A fill:#166534,stroke:#15803d,stroke-width:2px,color:#ffffff
0 commit comments