also looking at this
chore(deps): update dependency react to 19.2.7
#2137
222 files
+16350
-1825
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -105,29 +105,31 @@ barcode('#barcode', 'Example1234', { | ||
| 105 | 105 | ## Best Practices |
| 106 | 106 | |
| 107 | 107 | 1. Mode Selection: |
| 108 | - Use automatic mode unless you have specific requirements | |
| 109 | - Use Mode C for number-only data for maximum density | |
| 110 | - Use Mode A when uppercase and control characters are needed | |
| 111 | - Use Mode B for mixed-case text | |
| 108 | - Use automatic mode unless you have specific requirements | |
| 109 | - Use Mode C for number-only data for maximum density | |
| 110 | - Use Mode A when uppercase and control characters are needed | |
| 111 | - Use Mode B for mixed-case text | |
| 112 | ||
| 112 | 113 | 2. Data Validation: |
| 113 | - ```ts | |
| 114 | barcode('#barcode', 'Your Data', { | |
| 115 | format: 'CODE128', | |
| 116 | valid: (valid) => { | |
| 117 | if (!valid) | |
| 118 | console.error('Invalid data for CODE128') | |
| 119 | } | |
| 120 | }) | |
| 121 | ``` | |
| 114 | ```ts | |
| 115 | barcode('#barcode', 'Your Data', { | |
| 116 | format: 'CODE128', | |
| 117 | valid: (valid) => { | |
| 118 | if (!valid) | |
| 119 | console.error('Invalid data for CODE128') | |
| 120 | } | |
| 121 | }) | |
| 122 | ``` | |
| 123 | ||
| 122 | 124 | 3. Error Handling: |
| 123 | - ```ts | |
| 124 | try { | |
| 125 | barcode('#barcode', 'Your Data', { format: 'CODE128' }) | |
| 126 | } | |
| 127 | catch (error) { | |
| 128 | console.error('Failed to generate barcode:', error) | |
| 129 | } | |
| 130 | ``` | |
| 125 | ```ts | |
| 126 | try { | |
| 127 | barcode('#barcode', 'Your Data', { format: 'CODE128' }) | |
| 128 | } | |
| 129 | catch (error) { | |
| 130 | console.error('Failed to generate barcode:', error) | |
| 131 | } | |
| 132 | ``` | |
| 131 | 133 | |
| 132 | 134 | ## Format Specifications |
| 133 | 135 | |
| @@ -81,14 +81,16 @@ barcode('#barcode', 'CUSTOM39', { | ||
| 81 | 81 | ## Common Use Cases |
| 82 | 82 | |
| 83 | 83 | 1. **Military/Government** |
| 84 | - CAGE (Commercial and Government Entity) codes | |
| 85 | - Department of Defense applications | |
| 84 | - CAGE (Commercial and Government Entity) codes | |
| 85 | - Department of Defense applications | |
| 86 | ||
| 86 | 87 | 2. **Automotive Industry** |
| 87 | - Vehicle Identification Numbers (VIN) | |
| 88 | - Part tracking | |
| 88 | - Vehicle Identification Numbers (VIN) | |
| 89 | - Part tracking | |
| 90 | ||
| 89 | 91 | 3. **Healthcare** |
| 90 | - Patient identification | |
| 91 | - Medical equipment tracking | |
| 92 | - Patient identification | |
| 93 | - Medical equipment tracking | |
| 92 | 94 | |
| 93 | 95 | [!NOTE] Image needed: Example of CODE39 in real-world application |
| 94 | 96 | |
| @@ -112,20 +114,22 @@ barcode('#barcode', 'CUSTOM39', { | ||
| 112 | 114 | ## Best Practices |
| 113 | 115 | |
| 114 | 116 | 1. Input Validation |
| 115 | - Always verify input contains only valid characters | |
| 116 | - Consider using uppercase transformation for input | |
| 117 | - Always verify input contains only valid characters | |
| 118 | - Consider using uppercase transformation for input | |
| 119 | ||
| 117 | 120 | 2. Error Handling |
| 118 | ```ts | |
| 119 | try { | |
| 120 | barcode('#barcode', 'TEST-123', { format: 'CODE39' }) | |
| 121 | } | |
| 122 | catch (error) { | |
| 123 | console.error('Barcode generation failed:', error) | |
| 124 | } | |
| 125 | ``` | |
| 121 | ```ts | |
| 122 | try { | |
| 123 | barcode('#barcode', 'TEST-123', { format: 'CODE39' }) | |
| 124 | } | |
| 125 | catch (error) { | |
| 126 | console.error('Barcode generation failed:', error) | |
| 127 | } | |
| 128 | ``` | |
| 129 | ||
| 126 | 130 | 3. Check Digit Usage |
| 127 | - Enable mod43 for applications requiring high reliability | |
| 128 | - Ensure scanners are configured correctly for mod43 | |
| 131 | - Enable mod43 for applications requiring high reliability | |
| 132 | - Ensure scanners are configured correctly for mod43 | |
| 129 | 133 | |
| 130 | 134 | ## Migration to CODE128 |
| 131 | 135 | |