mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 07:41:01 +00:00
1 line
5.8 KiB
Plaintext
1 line
5.8 KiB
Plaintext
{"dependencies":[],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.isIp = isIp;\n const v4 = '(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}';\n const v6s = '[a-fA-F\\\\d]{1,4}';\n const v6 = `\n(?:\n(?:${v6s}:){7}(?:${v6s}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${v6s}:){6}(?:${v4}|:${v6s}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${v6s}:){5}(?::${v4}|(?::${v6s}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${v6s}:){4}(?:(?::${v6s}){0,1}:${v4}|(?::${v6s}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${v6s}:){3}(?:(?::${v6s}){0,2}:${v4}|(?::${v6s}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${v6s}:){2}(?:(?::${v6s}){0,3}:${v4}|(?::${v6s}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${v6s}:){1}(?:(?::${v6s}){0,4}:${v4}|(?::${v6s}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${v6s}){0,5}:${v4}|(?::${v6s}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\\s*\\/\\/.*$/gm, '').replace(/\\n/g, '').trim();\n const v46Exact = new RegExp(`(?:^${v4}$)|(?:^${v6}$)`);\n const v4exact = new RegExp(`^${v4}$`);\n const v6exact = new RegExp(`^${v6}$`);\n /**\n * @name isIp\n * @summary Tests if the value is a valid IP address\n * @description\n * Checks to see if the value is a valid IP address. Optionally check for either v4/v6\n * @example\n * <BR>\n *\n * ```javascript\n * import { isIp } from '@polkadot/util';\n *\n * isIp('192.168.0.1')); // => true\n * isIp('1:2:3:4:5:6:7:8'); // => true\n * isIp('192.168.0.1', 'v6')); // => false\n * isIp('1:2:3:4:5:6:7:8', 'v4'); // => false\n * ```\n */\n function isIp(value, type) {\n switch (type) {\n case 'v4':\n return v4exact.test(value);\n case 'v6':\n return v6exact.test(value);\n default:\n return v46Exact.test(value);\n }\n }\n});","lineCount":52,"map":[[2,2,1,0],[2,14,1,12],[4,2,2,0,"Object"],[4,8,2,6],[4,9,2,7,"defineProperty"],[4,23,2,21],[4,24,2,22,"exports"],[4,31,2,29],[4,33,2,31],[4,45,2,43],[4,47,2,45],[5,4,2,47,"value"],[5,9,2,52],[5,11,2,54],[6,2,2,59],[6,3,2,60],[6,4,2,61],[7,2,3,0,"exports"],[7,9,3,7],[7,10,3,8,"isIp"],[7,14,3,12],[7,17,3,15,"isIp"],[7,21,3,19],[8,2,4,0],[8,8,4,6,"v4"],[8,10,4,8],[8,13,4,11],[8,109,4,107],[9,2,5,0],[9,8,5,6,"v6s"],[9,11,5,9],[9,14,5,12],[9,32,5,30],[10,2,6,0],[10,8,6,6,"v6"],[10,10,6,8],[10,13,6,11],[11,0,7,0],[12,0,8,0],[12,5,8,5,"v6s"],[12,8,8,8],[12,19,8,19,"v6s"],[12,22,8,22],[13,0,9,0],[13,5,9,5,"v6s"],[13,8,9,8],[13,19,9,19,"v4"],[13,21,9,21],[13,26,9,26,"v6s"],[13,29,9,29],[14,0,10,0],[14,5,10,5,"v6s"],[14,8,10,8],[14,20,10,20,"v4"],[14,22,10,22],[14,30,10,30,"v6s"],[14,33,10,33],[15,0,11,0],[15,5,11,5,"v6s"],[15,8,11,8],[15,23,11,23,"v6s"],[15,26,11,26],[15,36,11,36,"v4"],[15,38,11,38],[15,46,11,46,"v6s"],[15,49,11,49],[16,0,12,0],[16,5,12,5,"v6s"],[16,8,12,8],[16,23,12,23,"v6s"],[16,26,12,26],[16,36,12,36,"v4"],[16,38,12,38],[16,46,12,46,"v6s"],[16,49,12,49],[17,0,13,0],[17,5,13,5,"v6s"],[17,8,13,8],[17,23,13,23,"v6s"],[17,26,13,26],[17,36,13,36,"v4"],[17,38,13,38],[17,46,13,46,"v6s"],[17,49,13,49],[18,0,14,0],[18,5,14,5,"v6s"],[18,8,14,8],[18,23,14,23,"v6s"],[18,26,14,26],[18,36,14,36,"v4"],[18,38,14,38],[18,46,14,46,"v6s"],[18,49,14,49],[19,0,15,0],[19,13,15,13,"v6s"],[19,16,15,16],[19,26,15,26,"v4"],[19,28,15,28],[19,36,15,36,"v6s"],[19,39,15,39],[20,0,16,0],[21,0,17,0],[21,1,17,1],[21,2,17,2,"replace"],[21,9,17,9],[21,10,17,10],[21,24,17,24],[21,26,17,26],[21,28,17,28],[21,29,17,29],[21,30,17,30,"replace"],[21,37,17,37],[21,38,17,38],[21,43,17,43],[21,45,17,45],[21,47,17,47],[21,48,17,48],[21,49,17,49,"trim"],[21,53,17,53],[21,54,17,54],[21,55,17,55],[22,2,18,0],[22,8,18,6,"v46Exact"],[22,16,18,14],[22,19,18,17],[22,23,18,21,"RegExp"],[22,29,18,27],[22,30,18,28],[22,37,18,35,"v4"],[22,39,18,37],[22,49,18,47,"v6"],[22,51,18,49],[22,55,18,53],[22,56,18,54],[23,2,19,0],[23,8,19,6,"v4exact"],[23,15,19,13],[23,18,19,16],[23,22,19,20,"RegExp"],[23,28,19,26],[23,29,19,27],[23,33,19,31,"v4"],[23,35,19,33],[23,38,19,36],[23,39,19,37],[24,2,20,0],[24,8,20,6,"v6exact"],[24,15,20,13],[24,18,20,16],[24,22,20,20,"RegExp"],[24,28,20,26],[24,29,20,27],[24,33,20,31,"v6"],[24,35,20,33],[24,38,20,36],[24,39,20,37],[25,2,21,0],[26,0,22,0],[27,0,23,0],[28,0,24,0],[29,0,25,0],[30,0,26,0],[31,0,27,0],[32,0,28,0],[33,0,29,0],[34,0,30,0],[35,0,31,0],[36,0,32,0],[37,0,33,0],[38,0,34,0],[39,0,35,0],[40,0,36,0],[41,0,37,0],[42,2,38,0],[42,11,38,9,"isIp"],[42,15,38,13,"isIp"],[42,16,38,14,"value"],[42,21,38,19],[42,23,38,21,"type"],[42,27,38,25],[42,29,38,27],[43,4,39,4],[43,12,39,12,"type"],[43,16,39,16],[44,6,40,8],[44,11,40,13],[44,15,40,17],[45,8,40,19],[45,15,40,26,"v4exact"],[45,22,40,33],[45,23,40,34,"test"],[45,27,40,38],[45,28,40,39,"value"],[45,33,40,44],[45,34,40,45],[46,6,41,8],[46,11,41,13],[46,15,41,17],[47,8,41,19],[47,15,41,26,"v6exact"],[47,22,41,33],[47,23,41,34,"test"],[47,27,41,38],[47,28,41,39,"value"],[47,33,41,44],[47,34,41,45],[48,6,42,8],[49,8,42,17],[49,15,42,24,"v46Exact"],[49,23,42,32],[49,24,42,33,"test"],[49,28,42,37],[49,29,42,38,"value"],[49,34,42,43],[49,35,42,44],[50,4,43,4],[51,2,44,0],[52,0,44,1],[52,3]],"functionMap":{"names":["<global>","isIp"],"mappings":"AAA;ACqC;CDM"},"hasCjsExports":true},"type":"js/module"}]} |