MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / normalizeIcloudHost

Function normalizeIcloudHost

icloud-utils.js:9–15  ·  view source on GitHub ↗
(rawHost)

Source from the content-addressed store, hash-verified

7 root.IcloudUtils = factory();
8})(typeof self !== 'undefined' ? self : globalThis, function createIcloudUtils() {
9 function normalizeIcloudHost(rawHost) {
10 const host = String(rawHost || '').trim().toLowerCase();
11 if (!host) return '';
12 if (host === 'icloud.com' || host === 'www.icloud.com' || host === 'setup.icloud.com') return 'icloud.com';
13 if (host === 'icloud.com.cn' || host === 'www.icloud.com.cn' || host === 'setup.icloud.com.cn') return 'icloud.com.cn';
14 return '';
15 }
16
17 function getConfiguredIcloudHostPreference(stateOrValue = '') {
18 const preference = typeof stateOrValue === 'object'

Calls

no outgoing calls

Tested by

no test coverage detected