@@ -227,12 +227,12 @@ Creates a partially applied function with preset options.
227
227
228
228
``` mermaid
229
229
graph TD
230
- Input[filesize(1536, options)] --> Format{Output Format}
230
+ Input[" filesize(1536, options)" ] --> Format{Output Format}
231
231
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"]
236
236
237
237
style Input fill:#166534,stroke:#15803d,stroke-width:2px,color:#ffffff
238
238
style String fill:#d97706,stroke:#b45309,stroke-width:2px,color:#ffffff
@@ -241,6 +241,23 @@ graph TD
241
241
style Exp fill:#166534,stroke:#15803d,stroke-width:2px,color:#ffffff
242
242
```
243
243
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
+
244
261
## Usage Patterns
245
262
246
263
### Basic Usage
@@ -560,19 +577,19 @@ export function SystemMetrics() {
560
577
``` mermaid
561
578
graph TB
562
579
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" ]
567
584
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()" ]
571
588
G --> H
572
589
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" ]
576
593
end
577
594
578
595
style A fill:#166534,stroke:#15803d,stroke-width:2px,color:#ffffff
0 commit comments