PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 4.6.1
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v4.6.1
4.7.0 4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 All 111 releases
wp-optimize / vendor / team-updraft / lib-onboarding-wizard / Wizard / Onboarding / src / utils / normalizeValue.ts

normalizeValue.ts in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 4.6.1, at vendor/team-updraft/lib-onboarding-wizard/Wizard/Onboarding/src/utils/normalizeValue.ts

14 lines 478 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 export const normalizeValue = (value: any): any => {
2 if (typeof value === 'boolean' || typeof value === 'number') {
3 return value;
4 }
5 if (typeof value === 'string') {
6 const trimmed = value.trim();
7 if (trimmed === '1') return true;
8 if (trimmed === '0') return false;
9 if (trimmed.toLowerCase() === 'true') return true;
10 if (trimmed.toLowerCase() === 'false') return false;
11 return trimmed;
12 }
13 return value;
14 };