tldts-core 5.7.84 → 5.7.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/es6/tsconfig.bundle.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/src/domain-without-suffix.ts +12 -0
- package/src/domain.ts +91 -0
- package/src/extract-hostname.ts +166 -0
- package/src/factory.ts +160 -0
- package/src/is-ip.ts +84 -0
- package/src/is-valid.ts +76 -0
- package/src/lookup/fast-path.ts +80 -0
- package/src/lookup/interface.ts +10 -0
- package/src/options.ts +39 -0
- package/src/subdomain.ts +11 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.full.d.ts","../../src/domain-without-suffix.ts","../../src/options.ts","../../src/domain.ts","../../src/extract-hostname.ts","../../src/is-ip.ts","../../src/is-valid.ts","../../src/lookup/interface.ts","../../src/subdomain.ts","../../src/factory.ts","../../src/lookup/fast-path.ts","../../index.ts","../../../../node_modules/@types/chai/index.d.ts","../../../../node_modules/@types/command-line-args/index.d.ts","../../../../node_modules/@types/command-line-usage/index.d.ts","../../../../node_modules/@types/estree/index.d.ts","../../../../node_modules/@types/minimatch/index.d.ts","../../../../node_modules/@types/minimist/index.d.ts","../../../../node_modules/@types/mocha/index.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/normalize-package-data/index.d.ts","../../../../node_modules/@types/parse-json/index.d.ts","../../../../node_modules/@types/resolve/index.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3f149f903dd20dfeb7c80e228b659f0e436532de772469980dbd00702cc05cc1","affectsGlobalScope":true},{"version":"1272277fe7daa738e555eb6cc45ded42cc2d0f76c07294142283145d49e96186","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},"d2f31f19e1ba6ed59be9259d660a239d9a3fcbbc8e038c6b2009bde34b175fed",{"version":"e8082815016e8450b598d5779c23f3fb0902709fbd51ea30c53e0a6ec31cef5a","signature":"e4b94e1cab43978c2cb360210076dc0ddc24127f899b26ecd1d08ad3e69a8bfb"},{"version":"0d7b6b51639fa0bc0ff2488a9d23b8c575f08233f9713ebcfebe7c80413a6c59","signature":"4ed6832518a6e057aca6c6861a7d86f432064a49b1cb6c960e472bcc2404e82a"},{"version":"c97619692e662cfea907c113d995363effed26e202507a864ae486976172431a","signature":"728ead54363374ff91f50d97f4e4cb016cf7d98b5776e4a275561465e9b55644"},{"version":"b7408929a50620520877175a44f1ef642b983113d406116ca049f53b78359731","signature":"1c2cd22324309770f5f95d5b545b8abfaa2f10012a495f7450cf5919efa5f1d0"},{"version":"a3ff5489b38f5e2169d770e274f5dd89b659602c26c98925335541f75b30a647","signature":"0070d0b5eac342c134ec352d2df82c2b44a89313c911a9a2c4192846b6670f47"},{"version":"691b1004b1b486c62f55782db01824ec42133908b865861aa77506ce8cc835d9","signature":"a4a9a883a79a43efcf8329429655b80c252e56c3e9dc838aed79e2b57cc7a301"},{"version":"58eb284519a37bcad186960e7e5e7090193ef4397d74fd121ac964115c60ddb8","signature":"863cbb90fdbdd1d4d46722580a9648a44732bbbca2ca36655f0951a872154ccc"},{"version":"b9d4b43460d9f3f3e3d0a78a8f27fe95dc9442fefb4264107f7e66dab1a723c0","signature":"570e79005c2a54cb13c7f8c04d072b96fb65209c977a6f2d06220b7972ec63fd"},{"version":"6d9095c2e92821e1f7661462e6845d4712af0ee5222dd12f6b23288b654a0aff","signature":"45c1b68819be5f90018e54b257c0fff392fa02224db1622d9eecd31649ffade7"},{"version":"1a311bc54bf1711ca339500fcbf63866c612658a80c36b6608b86394064b18ea","signature":"899c62c52e9f287a86c1c4dd1281495fd80c652ccc578d93b976fa6c1efa1941"},"ef35ce8b7e5f2a3b1fea423bec4d4549ca26303572686bde88bd93f820f582f9",{"version":"3a15910b7f45dfc393f010ee8f913580b08d65752800fc48147ea13445acd5f7","affectsGlobalScope":true},"e2790204f9394425bf7d8e93a919887823d03dc2830d31d09c8f6af5562634dd","65fa9dd7434e469671c4fb384cc9c610ad8ffc572351adec3e3d46f36a68f358","89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b","95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2","e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88",{"version":"3f6d6465811321abc30a1e5f667feed63e5b3917b3d6c8d6645daf96c75f97ba","affectsGlobalScope":true},"9122ed7070e054b73ebab37c2373a196def2d90e7d1a9a7fcd9d46b0e51fae78","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"77f0b5c6a193a699c9f7d7fb0578e64e562d271afa740783665d2a827104a873","affectsGlobalScope":true},"21a167fec8f933752fb8157f06d28fab6817af3ad9b0bdb1908a10762391eab9",{"version":"3e4624c306340ad303cc536a07004e81336c3f088308a9e4a9f4c957a3cda2fd","affectsGlobalScope":true},"0c0cee62cb619aed81133b904f644515ba3064487002a7da83fd8aa07b1b4abd","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","025fc13211ed47d2798269017af3ec869122a050d5431a6ad3c1997900e65c58","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","75ecef44f126e2ae018b4abbd85b6e8a2e2ba1638ebec56cc64274643ce3567b","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"249a2b90439cdfd51709539fbfa4dfe0791cbae6efce1e9b327ba8f8cd703f49","affectsGlobalScope":true},"40b991dc3365179e1365643589e168d7ea0588b4dd5bbb3a974ffefa7cb05e7f","bf057bb805c5e1c0e795ac7c759d40ebbe0e9894df9be3413bbdd8d1a2fc229e","74f2bb83d1ccf390f48681be57a30c09e85b4c7a801267746e382b2386fc667e","7bac475dcdd9f7e4e9da934d32c305bc889c4ce3c8ac0ef45a93a8d670fff607","5d357e7965026197a3152fa4e990fa7a4cbaf1578a17dff920ff1a71a325e198","8acf99b1c8682276a63ea5bb68433782715892726b97e4604a415e4e56bce41c",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"3b145a2351f5cf16abf999c8d5f4481c74dffdc54ec1e9a89992e2622e1226c5","a907bf91df26df2400858ef75f749498fb5cf00062bf90a737ac3949cc07978d","d270fd4b565eda11a0a737c181892316b7a1ace06c7988d0246219c3df11db06","70caef0271088abc5f5ae7ff6d84421d35bb192b690fbaa1b2ecf2b0ef01deb6",{"version":"59a638a504490fecaacf0020b9814b6abee37edb66047eb1ab9f7c2274bf1da0","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","d1a78a3c5708807e8de3e399f91df4797c62e44b02195eefc2209b2e713e54ee","8c4c1a64db28930732033c31418f817dcb9d09d706766707ae6d38f23faf0c53","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","12a70315c8281e46d65696086dd25827408e967b305a22276ae2779fe519e0fe","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","29d613c3964ea75b2b4e0d17098245c34529282e9cc72b7e4eeb2a7b12c27cb7",{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","a381f079c4804442f179d742fdb2e495fe28d67a47cac673485f75ae2e77aeca","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"bfe39beb986d2a2e512c091cbe924f1c415bc65de54de0e2f6a0dc6f84c183d9","affectsGlobalScope":true},"2af17363f8a062e3a8cd1b26030af0058b3f86e783f4fc6aa9f57247f240ebaa","06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","dfe08140492cdc135fb7fd9c4a652c05207b61a436906079b87da1d3111314bf","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","089e1f8603cbc35ab977c8dcc662eb754b82fca32ed1dfb16bd682726c2d5432","8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"82fc37849846a3a0264047621d5beb6ce2ddeb2f83bdee2c79523af3c3282d97","c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","8a19491eba2108d5c333c249699f40aff05ad312c04a17504573b27d91f0aede"],"options":{"composite":true,"declaration":true,"declarationDir":"../types","module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"strict":true,"target":4},"fileIdsList":[[108],[64,108],[67,108],[68,73,108],[69,79,80,87,96,107,108],[69,70,79,87,108],[71,108],[72,73,80,88,108],[73,96,104,108],[74,76,79,87,108],[75,108],[76,77,108],[78,79,108],[79,108],[79,80,81,96,107,108],[79,80,81,96,99,108],[108,112],[82,87,96,107,108],[79,80,82,83,87,96,104,107,108],[82,84,96,104,107,108],[64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114],[79,85,108],[86,107,108],[76,79,87,96,108],[88,108],[89,108],[67,90,108],[91,106,108,112],[92,108],[93,108],[79,94,108],[94,95,108,110],[79,96,97,98,99,108],[96,98,108],[96,97,108],[99,108],[100,108],[79,102,103,108],[102,103,108],[73,87,96,104,108],[105,108],[87,106,108],[68,82,93,107,108],[73,108],[96,108,109],[108,110],[108,111],[68,73,79,81,90,96,107,108,110,112],[96,108,113],[108,115],[47,52,54,55,108],[47,108],[46,47,48,49,50,51,52,53,108],[52,108],[47],[47,52],[52]],"referencedMap":[[57,1],[58,1],[59,1],[60,1],[61,1],[62,1],[63,1],[64,2],[65,2],[67,3],[68,4],[69,5],[70,6],[71,7],[72,8],[73,9],[74,10],[75,11],[76,12],[77,12],[78,13],[79,14],[80,15],[81,16],[66,17],[114,1],[82,18],[83,19],[84,20],[115,21],[85,22],[86,23],[87,24],[88,25],[89,26],[90,27],[91,28],[92,29],[93,30],[94,31],[95,32],[96,33],[98,34],[97,35],[99,36],[100,37],[101,1],[102,38],[103,39],[104,40],[105,41],[106,42],[107,43],[108,44],[109,45],[110,46],[111,47],[112,48],[113,49],[116,1],[117,1],[118,50],[8,1],[9,1],[13,1],[12,1],[2,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[3,1],[4,1],[45,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[33,1],[34,1],[35,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[1,1],[44,1],[11,1],[10,1],[56,51],[46,1],[48,52],[49,1],[54,53],[50,1],[51,1],[55,54],[52,1],[47,1],[53,1]],"exportedModulesMap":[[57,1],[58,1],[59,1],[60,1],[61,1],[62,1],[63,1],[64,2],[65,2],[67,3],[68,4],[69,5],[70,6],[71,7],[72,8],[73,9],[74,10],[75,11],[76,12],[77,12],[78,13],[79,14],[80,15],[81,16],[66,17],[114,1],[82,18],[83,19],[84,20],[115,21],[85,22],[86,23],[87,24],[88,25],[89,26],[90,27],[91,28],[92,29],[93,30],[94,31],[95,32],[96,33],[98,34],[97,35],[99,36],[100,37],[101,1],[102,38],[103,39],[104,40],[105,41],[106,42],[107,43],[108,44],[109,45],[110,46],[111,47],[112,48],[113,49],[116,1],[117,1],[118,50],[8,1],[9,1],[13,1],[12,1],[2,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[3,1],[4,1],[45,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[33,1],[34,1],[35,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[1,1],[44,1],[11,1],[10,1],[56,51],[48,55],[54,56],[55,57]],"semanticDiagnosticsPerFile":[57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,66,114,82,83,84,115,85,86,87,88,89,90,91,92,93,94,95,96,98,97,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,116,117,118,8,9,13,12,2,14,15,16,17,18,19,20,21,3,4,45,25,22,23,24,26,27,28,5,29,30,31,32,6,33,34,35,36,7,37,42,43,38,39,40,41,1,44,11,10,56,46,48,49,54,50,51,55,52,47,53]},"version":"4.7.4"}
|
|
1
|
+
{"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.full.d.ts","../../src/domain-without-suffix.ts","../../src/options.ts","../../src/domain.ts","../../src/extract-hostname.ts","../../src/is-ip.ts","../../src/is-valid.ts","../../src/lookup/interface.ts","../../src/subdomain.ts","../../src/factory.ts","../../src/lookup/fast-path.ts","../../index.ts","../../../../node_modules/@types/chai/index.d.ts","../../../../node_modules/@types/command-line-args/index.d.ts","../../../../node_modules/@types/command-line-usage/index.d.ts","../../../../node_modules/@types/estree/index.d.ts","../../../../node_modules/@types/json5/index.d.ts","../../../../node_modules/@types/minimatch/index.d.ts","../../../../node_modules/@types/minimist/index.d.ts","../../../../node_modules/@types/mocha/index.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/normalize-package-data/index.d.ts","../../../../node_modules/@types/parse-json/index.d.ts","../../../../node_modules/@types/resolve/index.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3f149f903dd20dfeb7c80e228b659f0e436532de772469980dbd00702cc05cc1","affectsGlobalScope":true},{"version":"1272277fe7daa738e555eb6cc45ded42cc2d0f76c07294142283145d49e96186","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},"d2f31f19e1ba6ed59be9259d660a239d9a3fcbbc8e038c6b2009bde34b175fed",{"version":"e8082815016e8450b598d5779c23f3fb0902709fbd51ea30c53e0a6ec31cef5a","signature":"e4b94e1cab43978c2cb360210076dc0ddc24127f899b26ecd1d08ad3e69a8bfb"},{"version":"0d7b6b51639fa0bc0ff2488a9d23b8c575f08233f9713ebcfebe7c80413a6c59","signature":"4ed6832518a6e057aca6c6861a7d86f432064a49b1cb6c960e472bcc2404e82a"},{"version":"c97619692e662cfea907c113d995363effed26e202507a864ae486976172431a","signature":"728ead54363374ff91f50d97f4e4cb016cf7d98b5776e4a275561465e9b55644"},{"version":"b7408929a50620520877175a44f1ef642b983113d406116ca049f53b78359731","signature":"1c2cd22324309770f5f95d5b545b8abfaa2f10012a495f7450cf5919efa5f1d0"},{"version":"a3ff5489b38f5e2169d770e274f5dd89b659602c26c98925335541f75b30a647","signature":"0070d0b5eac342c134ec352d2df82c2b44a89313c911a9a2c4192846b6670f47"},{"version":"691b1004b1b486c62f55782db01824ec42133908b865861aa77506ce8cc835d9","signature":"a4a9a883a79a43efcf8329429655b80c252e56c3e9dc838aed79e2b57cc7a301"},{"version":"58eb284519a37bcad186960e7e5e7090193ef4397d74fd121ac964115c60ddb8","signature":"863cbb90fdbdd1d4d46722580a9648a44732bbbca2ca36655f0951a872154ccc"},{"version":"b9d4b43460d9f3f3e3d0a78a8f27fe95dc9442fefb4264107f7e66dab1a723c0","signature":"570e79005c2a54cb13c7f8c04d072b96fb65209c977a6f2d06220b7972ec63fd"},{"version":"6d9095c2e92821e1f7661462e6845d4712af0ee5222dd12f6b23288b654a0aff","signature":"45c1b68819be5f90018e54b257c0fff392fa02224db1622d9eecd31649ffade7"},{"version":"1a311bc54bf1711ca339500fcbf63866c612658a80c36b6608b86394064b18ea","signature":"899c62c52e9f287a86c1c4dd1281495fd80c652ccc578d93b976fa6c1efa1941"},"ef35ce8b7e5f2a3b1fea423bec4d4549ca26303572686bde88bd93f820f582f9",{"version":"3a15910b7f45dfc393f010ee8f913580b08d65752800fc48147ea13445acd5f7","affectsGlobalScope":true},"e2790204f9394425bf7d8e93a919887823d03dc2830d31d09c8f6af5562634dd","65fa9dd7434e469671c4fb384cc9c610ad8ffc572351adec3e3d46f36a68f358","89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2","e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88",{"version":"3f6d6465811321abc30a1e5f667feed63e5b3917b3d6c8d6645daf96c75f97ba","affectsGlobalScope":true},"9122ed7070e054b73ebab37c2373a196def2d90e7d1a9a7fcd9d46b0e51fae78","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"77f0b5c6a193a699c9f7d7fb0578e64e562d271afa740783665d2a827104a873","affectsGlobalScope":true},"21a167fec8f933752fb8157f06d28fab6817af3ad9b0bdb1908a10762391eab9",{"version":"3e4624c306340ad303cc536a07004e81336c3f088308a9e4a9f4c957a3cda2fd","affectsGlobalScope":true},"0c0cee62cb619aed81133b904f644515ba3064487002a7da83fd8aa07b1b4abd","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","34ec1daf3566f26c43dbab380af0de1aac29166e57e4f9ef379a2f154e0cb290","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","75ecef44f126e2ae018b4abbd85b6e8a2e2ba1638ebec56cc64274643ce3567b","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"249a2b90439cdfd51709539fbfa4dfe0791cbae6efce1e9b327ba8f8cd703f49","affectsGlobalScope":true},"acc8fa7e1d03f0d8c4af03c75027086d80bf1cb17edd2d71313bee7bd12dfb91","a9b6b0f7b1e30359283b131ba6d1c51ee2d3601a2f12e1623141e6a1a60c92a5","aeee0090b38de0dd47ca9a79ad5c2d156e3e09d92306719b0b45a3e96098e564","7bac475dcdd9f7e4e9da934d32c305bc889c4ce3c8ac0ef45a93a8d670fff607","09416dd69576b03a3f485adf329a02f043e4a481e060ef5b208194e488d31fd9","8acf99b1c8682276a63ea5bb68433782715892726b97e4604a415e4e56bce41c",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"3b145a2351f5cf16abf999c8d5f4481c74dffdc54ec1e9a89992e2622e1226c5","a907bf91df26df2400858ef75f749498fb5cf00062bf90a737ac3949cc07978d","d270fd4b565eda11a0a737c181892316b7a1ace06c7988d0246219c3df11db06","4275d5f964e7fc7afc18538e26b3748c207dd772998346d17f409749aa1f3a63",{"version":"59a638a504490fecaacf0020b9814b6abee37edb66047eb1ab9f7c2274bf1da0","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","d1a78a3c5708807e8de3e399f91df4797c62e44b02195eefc2209b2e713e54ee","8c4c1a64db28930732033c31418f817dcb9d09d706766707ae6d38f23faf0c53","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","556bf5c36deb62cffa1bf697c1789fe008ec82db0273025001db66732714e9d9","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","653968fc1b35c5eb3d273d36fac1c1dc66f9537edf28f33485b8776bd956e23d",{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","a381f079c4804442f179d742fdb2e495fe28d67a47cac673485f75ae2e77aeca","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"bfe39beb986d2a2e512c091cbe924f1c415bc65de54de0e2f6a0dc6f84c183d9","affectsGlobalScope":true},"2af17363f8a062e3a8cd1b26030af0058b3f86e783f4fc6aa9f57247f240ebaa","06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","dfe08140492cdc135fb7fd9c4a652c05207b61a436906079b87da1d3111314bf","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","089e1f8603cbc35ab977c8dcc662eb754b82fca32ed1dfb16bd682726c2d5432","8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"64d5585e08ad1ab194b18bf4e851f22a626eae33ac7312ca4ba90bb7ea7daf64","c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","8a19491eba2108d5c333c249699f40aff05ad312c04a17504573b27d91f0aede"],"options":{"composite":true,"declaration":true,"declarationDir":"../types","module":1,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"strict":true,"target":4},"fileIdsList":[[109],[65,109],[68,109],[69,74,109],[70,80,81,88,97,108,109],[70,71,80,88,109],[72,109],[73,74,81,89,109],[74,97,105,109],[75,77,80,88,109],[76,109],[77,78,109],[79,80,109],[80,109],[80,81,82,97,108,109],[80,81,82,97,100,109],[109,113],[83,88,97,108,109],[80,81,83,84,88,97,105,108,109],[83,85,97,105,108,109],[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115],[80,86,109],[87,108,109],[77,80,88,97,109],[89,109],[90,109],[68,91,109],[92,107,109,113],[93,109],[94,109],[80,95,109],[95,96,109,111],[80,97,98,99,100,109],[97,99,109],[97,98,109],[100,109],[101,109],[80,103,104,109],[103,104,109],[74,88,97,105,109],[106,109],[88,107,109],[69,83,94,108,109],[74,109],[97,109,110],[109,111],[109,112],[69,74,80,82,91,97,108,109,111,113],[97,109,114],[109,116],[47,52,54,55,109],[47,109],[46,47,48,49,50,51,52,53,109],[52,109],[47],[47,52],[52]],"referencedMap":[[57,1],[58,1],[59,1],[60,1],[61,1],[62,1],[63,1],[64,1],[65,2],[66,2],[68,3],[69,4],[70,5],[71,6],[72,7],[73,8],[74,9],[75,10],[76,11],[77,12],[78,12],[79,13],[80,14],[81,15],[82,16],[67,17],[115,1],[83,18],[84,19],[85,20],[116,21],[86,22],[87,23],[88,24],[89,25],[90,26],[91,27],[92,28],[93,29],[94,30],[95,31],[96,32],[97,33],[99,34],[98,35],[100,36],[101,37],[102,1],[103,38],[104,39],[105,40],[106,41],[107,42],[108,43],[109,44],[110,45],[111,46],[112,47],[113,48],[114,49],[117,1],[118,1],[119,50],[8,1],[9,1],[13,1],[12,1],[2,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[3,1],[4,1],[45,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[33,1],[34,1],[35,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[1,1],[44,1],[11,1],[10,1],[56,51],[46,1],[48,52],[49,1],[54,53],[50,1],[51,1],[55,54],[52,1],[47,1],[53,1]],"exportedModulesMap":[[57,1],[58,1],[59,1],[60,1],[61,1],[62,1],[63,1],[64,1],[65,2],[66,2],[68,3],[69,4],[70,5],[71,6],[72,7],[73,8],[74,9],[75,10],[76,11],[77,12],[78,12],[79,13],[80,14],[81,15],[82,16],[67,17],[115,1],[83,18],[84,19],[85,20],[116,21],[86,22],[87,23],[88,24],[89,25],[90,26],[91,27],[92,28],[93,29],[94,30],[95,31],[96,32],[97,33],[99,34],[98,35],[100,36],[101,37],[102,1],[103,38],[104,39],[105,40],[106,41],[107,42],[108,43],[109,44],[110,45],[111,46],[112,47],[113,48],[114,49],[117,1],[118,1],[119,50],[8,1],[9,1],[13,1],[12,1],[2,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[3,1],[4,1],[45,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[33,1],[34,1],[35,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[1,1],[44,1],[11,1],[10,1],[56,51],[48,55],[54,56],[55,57]],"semanticDiagnosticsPerFile":[57,58,59,60,61,62,63,64,65,66,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,67,115,83,84,85,116,86,87,88,89,90,91,92,93,94,95,96,97,99,98,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,117,118,119,8,9,13,12,2,14,15,16,17,18,19,20,21,3,4,45,25,22,23,24,26,27,28,5,29,30,31,32,6,33,34,35,36,7,37,42,43,38,39,40,41,1,44,11,10,56,46,48,49,54,50,51,55,52,47,53]},"version":"4.7.4"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.full.d.ts","../../src/domain-without-suffix.ts","../../src/options.ts","../../src/domain.ts","../../src/extract-hostname.ts","../../src/is-ip.ts","../../src/is-valid.ts","../../src/lookup/interface.ts","../../src/subdomain.ts","../../src/factory.ts","../../src/lookup/fast-path.ts","../../index.ts","../../../../node_modules/@types/chai/index.d.ts","../../../../node_modules/@types/command-line-args/index.d.ts","../../../../node_modules/@types/command-line-usage/index.d.ts","../../../../node_modules/@types/estree/index.d.ts","../../../../node_modules/@types/minimatch/index.d.ts","../../../../node_modules/@types/minimist/index.d.ts","../../../../node_modules/@types/mocha/index.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/normalize-package-data/index.d.ts","../../../../node_modules/@types/parse-json/index.d.ts","../../../../node_modules/@types/resolve/index.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3f149f903dd20dfeb7c80e228b659f0e436532de772469980dbd00702cc05cc1","affectsGlobalScope":true},{"version":"1272277fe7daa738e555eb6cc45ded42cc2d0f76c07294142283145d49e96186","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},"d2f31f19e1ba6ed59be9259d660a239d9a3fcbbc8e038c6b2009bde34b175fed","e8082815016e8450b598d5779c23f3fb0902709fbd51ea30c53e0a6ec31cef5a","0d7b6b51639fa0bc0ff2488a9d23b8c575f08233f9713ebcfebe7c80413a6c59","c97619692e662cfea907c113d995363effed26e202507a864ae486976172431a","b7408929a50620520877175a44f1ef642b983113d406116ca049f53b78359731","a3ff5489b38f5e2169d770e274f5dd89b659602c26c98925335541f75b30a647","691b1004b1b486c62f55782db01824ec42133908b865861aa77506ce8cc835d9","58eb284519a37bcad186960e7e5e7090193ef4397d74fd121ac964115c60ddb8","b9d4b43460d9f3f3e3d0a78a8f27fe95dc9442fefb4264107f7e66dab1a723c0","6d9095c2e92821e1f7661462e6845d4712af0ee5222dd12f6b23288b654a0aff","1a311bc54bf1711ca339500fcbf63866c612658a80c36b6608b86394064b18ea","ef35ce8b7e5f2a3b1fea423bec4d4549ca26303572686bde88bd93f820f582f9",{"version":"3a15910b7f45dfc393f010ee8f913580b08d65752800fc48147ea13445acd5f7","affectsGlobalScope":true},"e2790204f9394425bf7d8e93a919887823d03dc2830d31d09c8f6af5562634dd","65fa9dd7434e469671c4fb384cc9c610ad8ffc572351adec3e3d46f36a68f358","89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b","95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2","e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88",{"version":"3f6d6465811321abc30a1e5f667feed63e5b3917b3d6c8d6645daf96c75f97ba","affectsGlobalScope":true},"9122ed7070e054b73ebab37c2373a196def2d90e7d1a9a7fcd9d46b0e51fae78","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"77f0b5c6a193a699c9f7d7fb0578e64e562d271afa740783665d2a827104a873","affectsGlobalScope":true},"21a167fec8f933752fb8157f06d28fab6817af3ad9b0bdb1908a10762391eab9",{"version":"3e4624c306340ad303cc536a07004e81336c3f088308a9e4a9f4c957a3cda2fd","affectsGlobalScope":true},"0c0cee62cb619aed81133b904f644515ba3064487002a7da83fd8aa07b1b4abd","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","025fc13211ed47d2798269017af3ec869122a050d5431a6ad3c1997900e65c58","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","75ecef44f126e2ae018b4abbd85b6e8a2e2ba1638ebec56cc64274643ce3567b","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"249a2b90439cdfd51709539fbfa4dfe0791cbae6efce1e9b327ba8f8cd703f49","affectsGlobalScope":true},"40b991dc3365179e1365643589e168d7ea0588b4dd5bbb3a974ffefa7cb05e7f","bf057bb805c5e1c0e795ac7c759d40ebbe0e9894df9be3413bbdd8d1a2fc229e","74f2bb83d1ccf390f48681be57a30c09e85b4c7a801267746e382b2386fc667e","7bac475dcdd9f7e4e9da934d32c305bc889c4ce3c8ac0ef45a93a8d670fff607","5d357e7965026197a3152fa4e990fa7a4cbaf1578a17dff920ff1a71a325e198","8acf99b1c8682276a63ea5bb68433782715892726b97e4604a415e4e56bce41c",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"3b145a2351f5cf16abf999c8d5f4481c74dffdc54ec1e9a89992e2622e1226c5","a907bf91df26df2400858ef75f749498fb5cf00062bf90a737ac3949cc07978d","d270fd4b565eda11a0a737c181892316b7a1ace06c7988d0246219c3df11db06","70caef0271088abc5f5ae7ff6d84421d35bb192b690fbaa1b2ecf2b0ef01deb6",{"version":"59a638a504490fecaacf0020b9814b6abee37edb66047eb1ab9f7c2274bf1da0","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","d1a78a3c5708807e8de3e399f91df4797c62e44b02195eefc2209b2e713e54ee","8c4c1a64db28930732033c31418f817dcb9d09d706766707ae6d38f23faf0c53","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","12a70315c8281e46d65696086dd25827408e967b305a22276ae2779fe519e0fe","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","29d613c3964ea75b2b4e0d17098245c34529282e9cc72b7e4eeb2a7b12c27cb7",{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","a381f079c4804442f179d742fdb2e495fe28d67a47cac673485f75ae2e77aeca","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"bfe39beb986d2a2e512c091cbe924f1c415bc65de54de0e2f6a0dc6f84c183d9","affectsGlobalScope":true},"2af17363f8a062e3a8cd1b26030af0058b3f86e783f4fc6aa9f57247f240ebaa","06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","dfe08140492cdc135fb7fd9c4a652c05207b61a436906079b87da1d3111314bf","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","089e1f8603cbc35ab977c8dcc662eb754b82fca32ed1dfb16bd682726c2d5432","8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"82fc37849846a3a0264047621d5beb6ce2ddeb2f83bdee2c79523af3c3282d97","c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","8a19491eba2108d5c333c249699f40aff05ad312c04a17504573b27d91f0aede"],"options":{"composite":false,"declaration":false,"declarationDir":"../..","declarationMap":false,"module":5,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"strict":true,"target":4},"fileIdsList":[[108],[64,108],[67,108],[68,73,108],[69,79,80,87,96,107,108],[69,70,79,87,108],[71,108],[72,73,80,88,108],[73,96,104,108],[74,76,79,87,108],[75,108],[76,77,108],[78,79,108],[79,108],[79,80,81,96,107,108],[79,80,81,96,99,108],[108,112],[82,87,96,107,108],[79,80,82,83,87,96,104,107,108],[82,84,96,104,107,108],[64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114],[79,85,108],[86,107,108],[76,79,87,96,108],[88,108],[89,108],[67,90,108],[91,106,108,112],[92,108],[93,108],[79,94,108],[94,95,108,110],[79,96,97,98,99,108],[96,98,108],[96,97,108],[99,108],[100,108],[79,102,103,108],[102,103,108],[73,87,96,104,108],[105,108],[87,106,108],[68,82,93,107,108],[73,108],[96,108,109],[108,110],[108,111],[68,73,79,81,90,96,107,108,110,112],[96,108,113],[108,115],[47,52,54,55,108],[47,108],[46,47,48,49,50,51,52,53,108],[52,108]],"referencedMap":[[57,1],[58,1],[59,1],[60,1],[61,1],[62,1],[63,1],[64,2],[65,2],[67,3],[68,4],[69,5],[70,6],[71,7],[72,8],[73,9],[74,10],[75,11],[76,12],[77,12],[78,13],[79,14],[80,15],[81,16],[66,17],[114,1],[82,18],[83,19],[84,20],[115,21],[85,22],[86,23],[87,24],[88,25],[89,26],[90,27],[91,28],[92,29],[93,30],[94,31],[95,32],[96,33],[98,34],[97,35],[99,36],[100,37],[101,1],[102,38],[103,39],[104,40],[105,41],[106,42],[107,43],[108,44],[109,45],[110,46],[111,47],[112,48],[113,49],[116,1],[117,1],[118,50],[8,1],[9,1],[13,1],[12,1],[2,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[3,1],[4,1],[45,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[33,1],[34,1],[35,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[1,1],[44,1],[11,1],[10,1],[56,51],[46,1],[48,52],[49,1],[54,53],[50,1],[51,1],[55,54],[52,1],[47,1],[53,1]],"exportedModulesMap":[[57,1],[58,1],[59,1],[60,1],[61,1],[62,1],[63,1],[64,2],[65,2],[67,3],[68,4],[69,5],[70,6],[71,7],[72,8],[73,9],[74,10],[75,11],[76,12],[77,12],[78,13],[79,14],[80,15],[81,16],[66,17],[114,1],[82,18],[83,19],[84,20],[115,21],[85,22],[86,23],[87,24],[88,25],[89,26],[90,27],[91,28],[92,29],[93,30],[94,31],[95,32],[96,33],[98,34],[97,35],[99,36],[100,37],[101,1],[102,38],[103,39],[104,40],[105,41],[106,42],[107,43],[108,44],[109,45],[110,46],[111,47],[112,48],[113,49],[116,1],[117,1],[118,50],[8,1],[9,1],[13,1],[12,1],[2,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[3,1],[4,1],[45,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[33,1],[34,1],[35,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[1,1],[44,1],[11,1],[10,1],[56,51],[46,1],[48,52],[49,1],[54,53],[50,1],[51,1],[55,54],[52,1],[47,1],[53,1]],"semanticDiagnosticsPerFile":[57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,66,114,82,83,84,115,85,86,87,88,89,90,91,92,93,94,95,96,98,97,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,116,117,118,8,9,13,12,2,14,15,16,17,18,19,20,21,3,4,45,25,22,23,24,26,27,28,5,29,30,31,32,6,33,34,35,36,7,37,42,43,38,39,40,41,1,44,11,10,56,46,48,49,54,50,51,55,52,47,53]},"version":"4.7.4"}
|
|
1
|
+
{"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../../node_modules/typescript/lib/lib.scripthost.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.full.d.ts","../../src/domain-without-suffix.ts","../../src/options.ts","../../src/domain.ts","../../src/extract-hostname.ts","../../src/is-ip.ts","../../src/is-valid.ts","../../src/lookup/interface.ts","../../src/subdomain.ts","../../src/factory.ts","../../src/lookup/fast-path.ts","../../index.ts","../../../../node_modules/@types/chai/index.d.ts","../../../../node_modules/@types/command-line-args/index.d.ts","../../../../node_modules/@types/command-line-usage/index.d.ts","../../../../node_modules/@types/estree/index.d.ts","../../../../node_modules/@types/json5/index.d.ts","../../../../node_modules/@types/minimatch/index.d.ts","../../../../node_modules/@types/minimist/index.d.ts","../../../../node_modules/@types/mocha/index.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/normalize-package-data/index.d.ts","../../../../node_modules/@types/parse-json/index.d.ts","../../../../node_modules/@types/resolve/index.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3f149f903dd20dfeb7c80e228b659f0e436532de772469980dbd00702cc05cc1","affectsGlobalScope":true},{"version":"1272277fe7daa738e555eb6cc45ded42cc2d0f76c07294142283145d49e96186","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},"d2f31f19e1ba6ed59be9259d660a239d9a3fcbbc8e038c6b2009bde34b175fed","e8082815016e8450b598d5779c23f3fb0902709fbd51ea30c53e0a6ec31cef5a","0d7b6b51639fa0bc0ff2488a9d23b8c575f08233f9713ebcfebe7c80413a6c59","c97619692e662cfea907c113d995363effed26e202507a864ae486976172431a","b7408929a50620520877175a44f1ef642b983113d406116ca049f53b78359731","a3ff5489b38f5e2169d770e274f5dd89b659602c26c98925335541f75b30a647","691b1004b1b486c62f55782db01824ec42133908b865861aa77506ce8cc835d9","58eb284519a37bcad186960e7e5e7090193ef4397d74fd121ac964115c60ddb8","b9d4b43460d9f3f3e3d0a78a8f27fe95dc9442fefb4264107f7e66dab1a723c0","6d9095c2e92821e1f7661462e6845d4712af0ee5222dd12f6b23288b654a0aff","1a311bc54bf1711ca339500fcbf63866c612658a80c36b6608b86394064b18ea","ef35ce8b7e5f2a3b1fea423bec4d4549ca26303572686bde88bd93f820f582f9",{"version":"3a15910b7f45dfc393f010ee8f913580b08d65752800fc48147ea13445acd5f7","affectsGlobalScope":true},"e2790204f9394425bf7d8e93a919887823d03dc2830d31d09c8f6af5562634dd","65fa9dd7434e469671c4fb384cc9c610ad8ffc572351adec3e3d46f36a68f358","89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2","e437d83044ba17246a861aa9691aa14223ff4a9d6f338ab1269c41c758586a88",{"version":"3f6d6465811321abc30a1e5f667feed63e5b3917b3d6c8d6645daf96c75f97ba","affectsGlobalScope":true},"9122ed7070e054b73ebab37c2373a196def2d90e7d1a9a7fcd9d46b0e51fae78","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"77f0b5c6a193a699c9f7d7fb0578e64e562d271afa740783665d2a827104a873","affectsGlobalScope":true},"21a167fec8f933752fb8157f06d28fab6817af3ad9b0bdb1908a10762391eab9",{"version":"3e4624c306340ad303cc536a07004e81336c3f088308a9e4a9f4c957a3cda2fd","affectsGlobalScope":true},"0c0cee62cb619aed81133b904f644515ba3064487002a7da83fd8aa07b1b4abd","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","34ec1daf3566f26c43dbab380af0de1aac29166e57e4f9ef379a2f154e0cb290","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","75ecef44f126e2ae018b4abbd85b6e8a2e2ba1638ebec56cc64274643ce3567b","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"249a2b90439cdfd51709539fbfa4dfe0791cbae6efce1e9b327ba8f8cd703f49","affectsGlobalScope":true},"acc8fa7e1d03f0d8c4af03c75027086d80bf1cb17edd2d71313bee7bd12dfb91","a9b6b0f7b1e30359283b131ba6d1c51ee2d3601a2f12e1623141e6a1a60c92a5","aeee0090b38de0dd47ca9a79ad5c2d156e3e09d92306719b0b45a3e96098e564","7bac475dcdd9f7e4e9da934d32c305bc889c4ce3c8ac0ef45a93a8d670fff607","09416dd69576b03a3f485adf329a02f043e4a481e060ef5b208194e488d31fd9","8acf99b1c8682276a63ea5bb68433782715892726b97e4604a415e4e56bce41c",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"3b145a2351f5cf16abf999c8d5f4481c74dffdc54ec1e9a89992e2622e1226c5","a907bf91df26df2400858ef75f749498fb5cf00062bf90a737ac3949cc07978d","d270fd4b565eda11a0a737c181892316b7a1ace06c7988d0246219c3df11db06","4275d5f964e7fc7afc18538e26b3748c207dd772998346d17f409749aa1f3a63",{"version":"59a638a504490fecaacf0020b9814b6abee37edb66047eb1ab9f7c2274bf1da0","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","d1a78a3c5708807e8de3e399f91df4797c62e44b02195eefc2209b2e713e54ee","8c4c1a64db28930732033c31418f817dcb9d09d706766707ae6d38f23faf0c53","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","556bf5c36deb62cffa1bf697c1789fe008ec82db0273025001db66732714e9d9","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","653968fc1b35c5eb3d273d36fac1c1dc66f9537edf28f33485b8776bd956e23d",{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","a381f079c4804442f179d742fdb2e495fe28d67a47cac673485f75ae2e77aeca","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"bfe39beb986d2a2e512c091cbe924f1c415bc65de54de0e2f6a0dc6f84c183d9","affectsGlobalScope":true},"2af17363f8a062e3a8cd1b26030af0058b3f86e783f4fc6aa9f57247f240ebaa","06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","dfe08140492cdc135fb7fd9c4a652c05207b61a436906079b87da1d3111314bf","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","089e1f8603cbc35ab977c8dcc662eb754b82fca32ed1dfb16bd682726c2d5432","8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"64d5585e08ad1ab194b18bf4e851f22a626eae33ac7312ca4ba90bb7ea7daf64","c9ad058b2cc9ce6dc2ed92960d6d009e8c04bef46d3f5312283debca6869f613","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","8a19491eba2108d5c333c249699f40aff05ad312c04a17504573b27d91f0aede"],"options":{"composite":false,"declaration":false,"declarationDir":"../..","declarationMap":false,"module":5,"noFallthroughCasesInSwitch":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"strict":true,"target":4},"fileIdsList":[[109],[65,109],[68,109],[69,74,109],[70,80,81,88,97,108,109],[70,71,80,88,109],[72,109],[73,74,81,89,109],[74,97,105,109],[75,77,80,88,109],[76,109],[77,78,109],[79,80,109],[80,109],[80,81,82,97,108,109],[80,81,82,97,100,109],[109,113],[83,88,97,108,109],[80,81,83,84,88,97,105,108,109],[83,85,97,105,108,109],[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115],[80,86,109],[87,108,109],[77,80,88,97,109],[89,109],[90,109],[68,91,109],[92,107,109,113],[93,109],[94,109],[80,95,109],[95,96,109,111],[80,97,98,99,100,109],[97,99,109],[97,98,109],[100,109],[101,109],[80,103,104,109],[103,104,109],[74,88,97,105,109],[106,109],[88,107,109],[69,83,94,108,109],[74,109],[97,109,110],[109,111],[109,112],[69,74,80,82,91,97,108,109,111,113],[97,109,114],[109,116],[47,52,54,55,109],[47,109],[46,47,48,49,50,51,52,53,109],[52,109]],"referencedMap":[[57,1],[58,1],[59,1],[60,1],[61,1],[62,1],[63,1],[64,1],[65,2],[66,2],[68,3],[69,4],[70,5],[71,6],[72,7],[73,8],[74,9],[75,10],[76,11],[77,12],[78,12],[79,13],[80,14],[81,15],[82,16],[67,17],[115,1],[83,18],[84,19],[85,20],[116,21],[86,22],[87,23],[88,24],[89,25],[90,26],[91,27],[92,28],[93,29],[94,30],[95,31],[96,32],[97,33],[99,34],[98,35],[100,36],[101,37],[102,1],[103,38],[104,39],[105,40],[106,41],[107,42],[108,43],[109,44],[110,45],[111,46],[112,47],[113,48],[114,49],[117,1],[118,1],[119,50],[8,1],[9,1],[13,1],[12,1],[2,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[3,1],[4,1],[45,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[33,1],[34,1],[35,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[1,1],[44,1],[11,1],[10,1],[56,51],[46,1],[48,52],[49,1],[54,53],[50,1],[51,1],[55,54],[52,1],[47,1],[53,1]],"exportedModulesMap":[[57,1],[58,1],[59,1],[60,1],[61,1],[62,1],[63,1],[64,1],[65,2],[66,2],[68,3],[69,4],[70,5],[71,6],[72,7],[73,8],[74,9],[75,10],[76,11],[77,12],[78,12],[79,13],[80,14],[81,15],[82,16],[67,17],[115,1],[83,18],[84,19],[85,20],[116,21],[86,22],[87,23],[88,24],[89,25],[90,26],[91,27],[92,28],[93,29],[94,30],[95,31],[96,32],[97,33],[99,34],[98,35],[100,36],[101,37],[102,1],[103,38],[104,39],[105,40],[106,41],[107,42],[108,43],[109,44],[110,45],[111,46],[112,47],[113,48],[114,49],[117,1],[118,1],[119,50],[8,1],[9,1],[13,1],[12,1],[2,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[3,1],[4,1],[45,1],[25,1],[22,1],[23,1],[24,1],[26,1],[27,1],[28,1],[5,1],[29,1],[30,1],[31,1],[32,1],[6,1],[33,1],[34,1],[35,1],[36,1],[7,1],[37,1],[42,1],[43,1],[38,1],[39,1],[40,1],[41,1],[1,1],[44,1],[11,1],[10,1],[56,51],[46,1],[48,52],[49,1],[54,53],[50,1],[51,1],[55,54],[52,1],[47,1],[53,1]],"semanticDiagnosticsPerFile":[57,58,59,60,61,62,63,64,65,66,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,67,115,83,84,85,116,86,87,88,89,90,91,92,93,94,95,96,97,99,98,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,117,118,119,8,9,13,12,2,14,15,16,17,18,19,20,21,3,4,45,25,22,23,24,26,27,28,5,29,30,31,32,6,33,34,35,36,7,37,42,43,38,39,40,41,1,44,11,10,56,46,48,49,54,50,51,55,52,47,53]},"version":"4.7.4"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tldts-core",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.85",
|
|
4
4
|
"description": "tldts core primitives (internal module)",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rémi Berson"
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"module": "dist/es6/index.js",
|
|
40
40
|
"types": "dist/types/index.d.ts",
|
|
41
41
|
"files": [
|
|
42
|
-
"dist"
|
|
42
|
+
"dist",
|
|
43
|
+
"src"
|
|
43
44
|
],
|
|
44
45
|
"scripts": {
|
|
45
46
|
"clean": "rimraf dist",
|
|
@@ -64,5 +65,5 @@
|
|
|
64
65
|
"tslint-config-prettier": "^1.18.0",
|
|
65
66
|
"typescript": "^4.3.2"
|
|
66
67
|
},
|
|
67
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "0c8f22ee6175f9a5992450e6412bf3c951b44988"
|
|
68
69
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* Return the part of domain without suffix.
|
|
4
|
+
*
|
|
5
|
+
* Example: for domain 'foo.com', the result would be 'foo'.
|
|
6
|
+
*/
|
|
7
|
+
export default function getDomainWithoutSuffix(domain: string, suffix: string): string {
|
|
8
|
+
// Note: here `domain` and `suffix` cannot have the same length because in
|
|
9
|
+
// this case we set `domain` to `null` instead. It is thus safe to assume
|
|
10
|
+
// that `suffix` is shorter than `domain`.
|
|
11
|
+
return domain.slice(0, -suffix.length - 1);
|
|
12
|
+
}
|
package/src/domain.ts
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { IOptions } from './options';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Check if `vhost` is a valid suffix of `hostname` (top-domain)
|
|
5
|
+
*
|
|
6
|
+
* It means that `vhost` needs to be a suffix of `hostname` and we then need to
|
|
7
|
+
* make sure that: either they are equal, or the character preceding `vhost` in
|
|
8
|
+
* `hostname` is a '.' (it should not be a partial label).
|
|
9
|
+
*
|
|
10
|
+
* * hostname = 'not.evil.com' and vhost = 'vil.com' => not ok
|
|
11
|
+
* * hostname = 'not.evil.com' and vhost = 'evil.com' => ok
|
|
12
|
+
* * hostname = 'not.evil.com' and vhost = 'not.evil.com' => ok
|
|
13
|
+
*/
|
|
14
|
+
function shareSameDomainSuffix(hostname: string, vhost: string): boolean {
|
|
15
|
+
if (hostname.endsWith(vhost)) {
|
|
16
|
+
return (
|
|
17
|
+
hostname.length === vhost.length ||
|
|
18
|
+
hostname[hostname.length - vhost.length - 1] === '.'
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Given a hostname and its public suffix, extract the general domain.
|
|
27
|
+
*/
|
|
28
|
+
function extractDomainWithSuffix(
|
|
29
|
+
hostname: string,
|
|
30
|
+
publicSuffix: string,
|
|
31
|
+
): string {
|
|
32
|
+
// Locate the index of the last '.' in the part of the `hostname` preceding
|
|
33
|
+
// the public suffix.
|
|
34
|
+
//
|
|
35
|
+
// examples:
|
|
36
|
+
// 1. not.evil.co.uk => evil.co.uk
|
|
37
|
+
// ^ ^
|
|
38
|
+
// | | start of public suffix
|
|
39
|
+
// | index of the last dot
|
|
40
|
+
//
|
|
41
|
+
// 2. example.co.uk => example.co.uk
|
|
42
|
+
// ^ ^
|
|
43
|
+
// | | start of public suffix
|
|
44
|
+
// |
|
|
45
|
+
// | (-1) no dot found before the public suffix
|
|
46
|
+
const publicSuffixIndex = hostname.length - publicSuffix.length - 2;
|
|
47
|
+
const lastDotBeforeSuffixIndex = hostname.lastIndexOf('.', publicSuffixIndex);
|
|
48
|
+
|
|
49
|
+
// No '.' found, then `hostname` is the general domain (no sub-domain)
|
|
50
|
+
if (lastDotBeforeSuffixIndex === -1) {
|
|
51
|
+
return hostname;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Extract the part between the last '.'
|
|
55
|
+
return hostname.slice(lastDotBeforeSuffixIndex + 1);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Detects the domain based on rules and upon and a host string
|
|
60
|
+
*/
|
|
61
|
+
export default function getDomain(
|
|
62
|
+
suffix: string,
|
|
63
|
+
hostname: string,
|
|
64
|
+
options: IOptions,
|
|
65
|
+
): string | null {
|
|
66
|
+
// Check if `hostname` ends with a member of `validHosts`.
|
|
67
|
+
if (options.validHosts !== null) {
|
|
68
|
+
const validHosts = options.validHosts;
|
|
69
|
+
for (let i = 0; i < validHosts.length; i += 1) {
|
|
70
|
+
const vhost = validHosts[i];
|
|
71
|
+
if (/*@__INLINE__*/ shareSameDomainSuffix(hostname, vhost) === true) {
|
|
72
|
+
return vhost;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// If `hostname` is a valid public suffix, then there is no domain to return.
|
|
78
|
+
// Since we already know that `getPublicSuffix` returns a suffix of `hostname`
|
|
79
|
+
// there is no need to perform a string comparison and we only compare the
|
|
80
|
+
// size.
|
|
81
|
+
if (suffix.length === hostname.length) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// To extract the general domain, we start by identifying the public suffix
|
|
86
|
+
// (if any), then consider the domain to be the public suffix with one added
|
|
87
|
+
// level of depth. (e.g.: if hostname is `not.evil.co.uk` and public suffix:
|
|
88
|
+
// `co.uk`, then we take one more level: `evil`, giving the final result:
|
|
89
|
+
// `evil.co.uk`).
|
|
90
|
+
return /*@__INLINE__*/ extractDomainWithSuffix(hostname, suffix);
|
|
91
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param url - URL we want to extract a hostname from.
|
|
3
|
+
* @param urlIsValidHostname - hint from caller; true if `url` is already a valid hostname.
|
|
4
|
+
*/
|
|
5
|
+
export default function extractHostname(
|
|
6
|
+
url: string,
|
|
7
|
+
urlIsValidHostname: boolean,
|
|
8
|
+
): string | null {
|
|
9
|
+
let start: number = 0;
|
|
10
|
+
let end: number = url.length;
|
|
11
|
+
let hasUpper: boolean = false;
|
|
12
|
+
|
|
13
|
+
// If url is not already a valid hostname, then try to extract hostname.
|
|
14
|
+
if (urlIsValidHostname === false) {
|
|
15
|
+
// Special handling of data URLs
|
|
16
|
+
if (url.startsWith('data:') === true) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Trim leading spaces
|
|
21
|
+
while (start < url.length && url.charCodeAt(start) <= 32) {
|
|
22
|
+
start += 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Trim trailing spaces
|
|
26
|
+
while (end > start + 1 && url.charCodeAt(end - 1) <= 32) {
|
|
27
|
+
end -= 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Skip scheme.
|
|
31
|
+
if (
|
|
32
|
+
url.charCodeAt(start) === 47 /* '/' */ &&
|
|
33
|
+
url.charCodeAt(start + 1) === 47 /* '/' */
|
|
34
|
+
) {
|
|
35
|
+
start += 2;
|
|
36
|
+
} else {
|
|
37
|
+
const indexOfProtocol = url.indexOf(':/', start);
|
|
38
|
+
if (indexOfProtocol !== -1) {
|
|
39
|
+
// Implement fast-path for common protocols. We expect most protocols
|
|
40
|
+
// should be one of these 4 and thus we will not need to perform the
|
|
41
|
+
// more expansive validity check most of the time.
|
|
42
|
+
const protocolSize = indexOfProtocol - start;
|
|
43
|
+
const c0 = url.charCodeAt(start);
|
|
44
|
+
const c1 = url.charCodeAt(start + 1);
|
|
45
|
+
const c2 = url.charCodeAt(start + 2);
|
|
46
|
+
const c3 = url.charCodeAt(start + 3);
|
|
47
|
+
const c4 = url.charCodeAt(start + 4);
|
|
48
|
+
|
|
49
|
+
if (
|
|
50
|
+
protocolSize === 5 &&
|
|
51
|
+
c0 === 104 /* 'h' */ &&
|
|
52
|
+
c1 === 116 /* 't' */ &&
|
|
53
|
+
c2 === 116 /* 't' */ &&
|
|
54
|
+
c3 === 112 /* 'p' */ &&
|
|
55
|
+
c4 === 115 /* 's' */
|
|
56
|
+
) {
|
|
57
|
+
// https
|
|
58
|
+
} else if (
|
|
59
|
+
protocolSize === 4 &&
|
|
60
|
+
c0 === 104 /* 'h' */ &&
|
|
61
|
+
c1 === 116 /* 't' */ &&
|
|
62
|
+
c2 === 116 /* 't' */ &&
|
|
63
|
+
c3 === 112 /* 'p' */
|
|
64
|
+
) {
|
|
65
|
+
// http
|
|
66
|
+
} else if (
|
|
67
|
+
protocolSize === 3 &&
|
|
68
|
+
c0 === 119 /* 'w' */ &&
|
|
69
|
+
c1 === 115 /* 's' */ &&
|
|
70
|
+
c2 === 115 /* 's' */
|
|
71
|
+
) {
|
|
72
|
+
// wss
|
|
73
|
+
} else if (
|
|
74
|
+
protocolSize === 2 &&
|
|
75
|
+
c0 === 119 /* 'w' */ &&
|
|
76
|
+
c1 === 115 /* 's' */
|
|
77
|
+
) {
|
|
78
|
+
// ws
|
|
79
|
+
} else {
|
|
80
|
+
// Check that scheme is valid
|
|
81
|
+
for (let i = start; i < indexOfProtocol; i += 1) {
|
|
82
|
+
const lowerCaseCode = url.charCodeAt(i) | 32;
|
|
83
|
+
if (
|
|
84
|
+
((lowerCaseCode >= 97 && lowerCaseCode <= 122) || // [a, z]
|
|
85
|
+
(lowerCaseCode >= 48 && lowerCaseCode <= 57) || // [0, 9]
|
|
86
|
+
lowerCaseCode === 46 || // '.'
|
|
87
|
+
lowerCaseCode === 45 || // '-'
|
|
88
|
+
lowerCaseCode === 43) === false // '+'
|
|
89
|
+
) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Skip 0, 1 or more '/' after ':/'
|
|
96
|
+
start = indexOfProtocol + 2;
|
|
97
|
+
while (url.charCodeAt(start) === 47 /* '/' */) {
|
|
98
|
+
start += 1;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Detect first occurrence of '/', '?' or '#'. We also keep track of the
|
|
104
|
+
// last occurrence of '@', ']' or ':' to speed-up subsequent parsing of
|
|
105
|
+
// (respectively), identifier, ipv6 or port.
|
|
106
|
+
let indexOfIdentifier: number = -1;
|
|
107
|
+
let indexOfClosingBracket: number = -1;
|
|
108
|
+
let indexOfPort: number = -1;
|
|
109
|
+
for (let i = start; i < end; i += 1) {
|
|
110
|
+
const code: number = url.charCodeAt(i);
|
|
111
|
+
if (
|
|
112
|
+
code === 35 || // '#'
|
|
113
|
+
code === 47 || // '/'
|
|
114
|
+
code === 63 // '?'
|
|
115
|
+
) {
|
|
116
|
+
end = i;
|
|
117
|
+
break;
|
|
118
|
+
} else if (code === 64) {
|
|
119
|
+
// '@'
|
|
120
|
+
indexOfIdentifier = i;
|
|
121
|
+
} else if (code === 93) {
|
|
122
|
+
// ']'
|
|
123
|
+
indexOfClosingBracket = i;
|
|
124
|
+
} else if (code === 58) {
|
|
125
|
+
// ':'
|
|
126
|
+
indexOfPort = i;
|
|
127
|
+
} else if (code >= 65 && code <= 90) {
|
|
128
|
+
hasUpper = true;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Detect identifier: '@'
|
|
133
|
+
if (
|
|
134
|
+
indexOfIdentifier !== -1 &&
|
|
135
|
+
indexOfIdentifier > start &&
|
|
136
|
+
indexOfIdentifier < end
|
|
137
|
+
) {
|
|
138
|
+
start = indexOfIdentifier + 1;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Handle ipv6 addresses
|
|
142
|
+
if (url.charCodeAt(start) === 91 /* '[' */) {
|
|
143
|
+
if (indexOfClosingBracket !== -1) {
|
|
144
|
+
return url.slice(start + 1, indexOfClosingBracket).toLowerCase();
|
|
145
|
+
}
|
|
146
|
+
return null;
|
|
147
|
+
} else if (indexOfPort !== -1 && indexOfPort > start && indexOfPort < end) {
|
|
148
|
+
// Detect port: ':'
|
|
149
|
+
end = indexOfPort;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Trim trailing dots
|
|
154
|
+
while (end > start + 1 && url.charCodeAt(end - 1) === 46 /* '.' */) {
|
|
155
|
+
end -= 1;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const hostname: string =
|
|
159
|
+
start !== 0 || end !== url.length ? url.slice(start, end) : url;
|
|
160
|
+
|
|
161
|
+
if (hasUpper) {
|
|
162
|
+
return hostname.toLowerCase();
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return hostname;
|
|
166
|
+
}
|
package/src/factory.ts
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Implement a factory allowing to plug different implementations of suffix
|
|
3
|
+
* lookup (e.g.: using a trie or the packed hashes datastructures). This is used
|
|
4
|
+
* and exposed in `tldts.ts` and `tldts-experimental.ts` bundle entrypoints.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import getDomain from './domain';
|
|
8
|
+
import getDomainWithoutSuffix from './domain-without-suffix';
|
|
9
|
+
import extractHostname from './extract-hostname';
|
|
10
|
+
import isIp from './is-ip';
|
|
11
|
+
import isValidHostname from './is-valid';
|
|
12
|
+
import { IPublicSuffix, ISuffixLookupOptions } from './lookup/interface';
|
|
13
|
+
import { IOptions, setDefaults } from './options';
|
|
14
|
+
import getSubdomain from './subdomain';
|
|
15
|
+
|
|
16
|
+
export interface IResult {
|
|
17
|
+
// `hostname` is either a registered name (including but not limited to a
|
|
18
|
+
// hostname), or an IP address. IPv4 addresses must be in dot-decimal
|
|
19
|
+
// notation, and IPv6 addresses must be enclosed in brackets ([]). This is
|
|
20
|
+
// directly extracted from the input URL.
|
|
21
|
+
hostname: string | null;
|
|
22
|
+
|
|
23
|
+
// Is `hostname` an IP? (IPv4 or IPv6)
|
|
24
|
+
isIp: boolean | null;
|
|
25
|
+
|
|
26
|
+
// `hostname` split between subdomain, domain and its public suffix (if any)
|
|
27
|
+
subdomain: string | null;
|
|
28
|
+
domain: string | null;
|
|
29
|
+
publicSuffix: string | null;
|
|
30
|
+
domainWithoutSuffix: string | null;
|
|
31
|
+
|
|
32
|
+
// Specifies if `publicSuffix` comes from the ICANN or PRIVATE section of the list
|
|
33
|
+
isIcann: boolean | null;
|
|
34
|
+
isPrivate: boolean | null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function getEmptyResult(): IResult {
|
|
38
|
+
return {
|
|
39
|
+
domain: null,
|
|
40
|
+
domainWithoutSuffix: null,
|
|
41
|
+
hostname: null,
|
|
42
|
+
isIcann: null,
|
|
43
|
+
isIp: null,
|
|
44
|
+
isPrivate: null,
|
|
45
|
+
publicSuffix: null,
|
|
46
|
+
subdomain: null,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function resetResult(result: IResult): void {
|
|
51
|
+
result.domain = null;
|
|
52
|
+
result.domainWithoutSuffix = null;
|
|
53
|
+
result.hostname = null;
|
|
54
|
+
result.isIcann = null;
|
|
55
|
+
result.isIp = null;
|
|
56
|
+
result.isPrivate = null;
|
|
57
|
+
result.publicSuffix = null;
|
|
58
|
+
result.subdomain = null;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Flags representing steps in the `parse` function. They are used to implement
|
|
62
|
+
// an early stop mechanism (simulating some form of laziness) to avoid doing
|
|
63
|
+
// more work than necessary to perform a given action (e.g.: we don't need to
|
|
64
|
+
// extract the domain and subdomain if we are only interested in public suffix).
|
|
65
|
+
export const enum FLAG {
|
|
66
|
+
HOSTNAME,
|
|
67
|
+
IS_VALID,
|
|
68
|
+
PUBLIC_SUFFIX,
|
|
69
|
+
DOMAIN,
|
|
70
|
+
SUB_DOMAIN,
|
|
71
|
+
ALL,
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function parseImpl(
|
|
75
|
+
url: string,
|
|
76
|
+
step: FLAG,
|
|
77
|
+
suffixLookup: (
|
|
78
|
+
_1: string,
|
|
79
|
+
_2: ISuffixLookupOptions,
|
|
80
|
+
_3: IPublicSuffix,
|
|
81
|
+
) => void,
|
|
82
|
+
partialOptions: Partial<IOptions>,
|
|
83
|
+
result: IResult,
|
|
84
|
+
): IResult {
|
|
85
|
+
const options: IOptions = /*@__INLINE__*/ setDefaults(partialOptions);
|
|
86
|
+
|
|
87
|
+
// Very fast approximate check to make sure `url` is a string. This is needed
|
|
88
|
+
// because the library will not necessarily be used in a typed setup and
|
|
89
|
+
// values of arbitrary types might be given as argument.
|
|
90
|
+
if (typeof url !== 'string') {
|
|
91
|
+
return result;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Extract hostname from `url` only if needed. This can be made optional
|
|
95
|
+
// using `options.extractHostname`. This option will typically be used
|
|
96
|
+
// whenever we are sure the inputs to `parse` are already hostnames and not
|
|
97
|
+
// arbitrary URLs.
|
|
98
|
+
//
|
|
99
|
+
// `mixedInput` allows to specify if we expect a mix of URLs and hostnames
|
|
100
|
+
// as input. If only hostnames are expected then `extractHostname` can be
|
|
101
|
+
// set to `false` to speed-up parsing. If only URLs are expected then
|
|
102
|
+
// `mixedInputs` can be set to `false`. The `mixedInputs` is only a hint
|
|
103
|
+
// and will not change the behavior of the library.
|
|
104
|
+
if (options.extractHostname === false) {
|
|
105
|
+
result.hostname = url;
|
|
106
|
+
} else if (options.mixedInputs === true) {
|
|
107
|
+
result.hostname = extractHostname(url, isValidHostname(url));
|
|
108
|
+
} else {
|
|
109
|
+
result.hostname = extractHostname(url, false);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (step === FLAG.HOSTNAME || result.hostname === null) {
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Check if `hostname` is a valid ip address
|
|
117
|
+
if (options.detectIp === true) {
|
|
118
|
+
result.isIp = isIp(result.hostname);
|
|
119
|
+
if (result.isIp === true) {
|
|
120
|
+
return result;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Perform optional hostname validation. If hostname is not valid, no need to
|
|
125
|
+
// go further as there will be no valid domain or sub-domain.
|
|
126
|
+
if (
|
|
127
|
+
options.validateHostname === true &&
|
|
128
|
+
options.extractHostname === true &&
|
|
129
|
+
isValidHostname(result.hostname) === false
|
|
130
|
+
) {
|
|
131
|
+
result.hostname = null;
|
|
132
|
+
return result;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Extract public suffix
|
|
136
|
+
suffixLookup(result.hostname, options, result);
|
|
137
|
+
if (step === FLAG.PUBLIC_SUFFIX || result.publicSuffix === null) {
|
|
138
|
+
return result;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Extract domain
|
|
142
|
+
result.domain = getDomain(result.publicSuffix, result.hostname, options);
|
|
143
|
+
if (step === FLAG.DOMAIN || result.domain === null) {
|
|
144
|
+
return result;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Extract subdomain
|
|
148
|
+
result.subdomain = getSubdomain(result.hostname, result.domain);
|
|
149
|
+
if (step === FLAG.SUB_DOMAIN) {
|
|
150
|
+
return result;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Extract domain without suffix
|
|
154
|
+
result.domainWithoutSuffix = getDomainWithoutSuffix(
|
|
155
|
+
result.domain,
|
|
156
|
+
result.publicSuffix,
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
return result;
|
|
160
|
+
}
|
package/src/is-ip.ts
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if a hostname is an IP. You should be aware that this only works
|
|
3
|
+
* because `hostname` is already garanteed to be a valid hostname!
|
|
4
|
+
*/
|
|
5
|
+
function isProbablyIpv4(hostname: string): boolean {
|
|
6
|
+
// Cannot be shorted than 1.1.1.1
|
|
7
|
+
if (hostname.length < 7) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Cannot be longer than: 255.255.255.255
|
|
12
|
+
if (hostname.length > 15) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let numberOfDots = 0;
|
|
17
|
+
|
|
18
|
+
for (let i = 0; i < hostname.length; i += 1) {
|
|
19
|
+
const code = hostname.charCodeAt(i);
|
|
20
|
+
|
|
21
|
+
if (code === 46 /* '.' */) {
|
|
22
|
+
numberOfDots += 1;
|
|
23
|
+
} else if (code < 48 /* '0' */ || code > 57 /* '9' */) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
numberOfDots === 3 &&
|
|
30
|
+
hostname.charCodeAt(0) !== 46 /* '.' */ &&
|
|
31
|
+
hostname.charCodeAt(hostname.length - 1) !== 46 /* '.' */
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Similar to isProbablyIpv4.
|
|
37
|
+
*/
|
|
38
|
+
function isProbablyIpv6(hostname: string): boolean {
|
|
39
|
+
if (hostname.length < 3) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
let start = hostname[0] === '[' ? 1 : 0;
|
|
44
|
+
let end = hostname.length;
|
|
45
|
+
|
|
46
|
+
if (hostname[end - 1] === ']') {
|
|
47
|
+
end -= 1;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// We only consider the maximum size of a normal IPV6. Note that this will
|
|
51
|
+
// fail on so-called "IPv4 mapped IPv6 addresses" but this is a corner-case
|
|
52
|
+
// and a proper validation library should be used for these.
|
|
53
|
+
if (end - start > 39) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
let hasColon: boolean = false;
|
|
58
|
+
|
|
59
|
+
for (; start < end; start += 1) {
|
|
60
|
+
const code = hostname.charCodeAt(start);
|
|
61
|
+
|
|
62
|
+
if (code === 58 /* ':' */) {
|
|
63
|
+
hasColon = true;
|
|
64
|
+
} else if (
|
|
65
|
+
((code >= 48 && code <= 57) || // 0-9
|
|
66
|
+
(code >= 97 && code <= 102) || // a-f
|
|
67
|
+
(code >= 65 && code <= 90)) === // A-F
|
|
68
|
+
false
|
|
69
|
+
) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return hasColon;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Check if `hostname` is *probably* a valid ip addr (either ipv6 or ipv4).
|
|
79
|
+
* This *will not* work on any string. We need `hostname` to be a valid
|
|
80
|
+
* hostname.
|
|
81
|
+
*/
|
|
82
|
+
export default function isIp(hostname: string): boolean {
|
|
83
|
+
return isProbablyIpv6(hostname) || isProbablyIpv4(hostname);
|
|
84
|
+
}
|
package/src/is-valid.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Implements fast shallow verification of hostnames. This does not perform a
|
|
3
|
+
* struct check on the content of labels (classes of Unicode characters, etc.)
|
|
4
|
+
* but instead check that the structure is valid (number of labels, length of
|
|
5
|
+
* labels, etc.).
|
|
6
|
+
*
|
|
7
|
+
* If you need stricter validation, consider using an external library.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
function isValidAscii(code: number): boolean {
|
|
11
|
+
return (
|
|
12
|
+
(code >= 97 && code <= 122) || (code >= 48 && code <= 57) || code > 127
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Check if a hostname string is valid. It's usually a preliminary check before
|
|
18
|
+
* trying to use getDomain or anything else.
|
|
19
|
+
*
|
|
20
|
+
* Beware: it does not check if the TLD exists.
|
|
21
|
+
*/
|
|
22
|
+
export default function (hostname: string): boolean {
|
|
23
|
+
if (hostname.length > 255) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (hostname.length === 0) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (/*@__INLINE__*/ isValidAscii(hostname.charCodeAt(0)) === false) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Validate hostname according to RFC
|
|
36
|
+
let lastDotIndex: number = -1;
|
|
37
|
+
let lastCharCode: number = -1;
|
|
38
|
+
const len = hostname.length;
|
|
39
|
+
|
|
40
|
+
for (let i = 0; i < len; i += 1) {
|
|
41
|
+
const code = hostname.charCodeAt(i);
|
|
42
|
+
if (code === 46 /* '.' */) {
|
|
43
|
+
if (
|
|
44
|
+
// Check that previous label is < 63 bytes long (64 = 63 + '.')
|
|
45
|
+
i - lastDotIndex > 64 ||
|
|
46
|
+
// Check that previous character was not already a '.'
|
|
47
|
+
lastCharCode === 46 ||
|
|
48
|
+
// Check that the previous label does not end with a '-' (dash)
|
|
49
|
+
lastCharCode === 45 ||
|
|
50
|
+
// Check that the previous label does not end with a '_' (underscore)
|
|
51
|
+
lastCharCode === 95
|
|
52
|
+
) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
lastDotIndex = i;
|
|
57
|
+
} else if (
|
|
58
|
+
(/*@__INLINE__*/ isValidAscii(code) || code === 45 || code === 95) ===
|
|
59
|
+
false
|
|
60
|
+
) {
|
|
61
|
+
// Check if there is a forbidden character in the label
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
lastCharCode = code;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
// Check that last label is shorter than 63 chars
|
|
70
|
+
len - lastDotIndex - 1 <= 63 &&
|
|
71
|
+
// Check that the last character is an allowed trailing label character.
|
|
72
|
+
// Since we already checked that the char is a valid hostname character,
|
|
73
|
+
// we only need to check that it's different from '-'.
|
|
74
|
+
lastCharCode !== 45
|
|
75
|
+
);
|
|
76
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { IPublicSuffix, ISuffixLookupOptions } from './interface';
|
|
2
|
+
|
|
3
|
+
export default function(
|
|
4
|
+
hostname: string,
|
|
5
|
+
options: ISuffixLookupOptions,
|
|
6
|
+
out: IPublicSuffix,
|
|
7
|
+
): boolean {
|
|
8
|
+
// Fast path for very popular suffixes; this allows to by-pass lookup
|
|
9
|
+
// completely as well as any extra allocation or string manipulation.
|
|
10
|
+
if (options.allowPrivateDomains === false && hostname.length > 3) {
|
|
11
|
+
const last: number = hostname.length - 1;
|
|
12
|
+
const c3: number = hostname.charCodeAt(last);
|
|
13
|
+
const c2: number = hostname.charCodeAt(last - 1);
|
|
14
|
+
const c1: number = hostname.charCodeAt(last - 2);
|
|
15
|
+
const c0: number = hostname.charCodeAt(last - 3);
|
|
16
|
+
|
|
17
|
+
if (
|
|
18
|
+
c3 === 109 /* 'm' */ &&
|
|
19
|
+
c2 === 111 /* 'o' */ &&
|
|
20
|
+
c1 === 99 /* 'c' */ &&
|
|
21
|
+
c0 === 46 /* '.' */
|
|
22
|
+
) {
|
|
23
|
+
out.isIcann = true;
|
|
24
|
+
out.isPrivate = false;
|
|
25
|
+
out.publicSuffix = 'com';
|
|
26
|
+
return true;
|
|
27
|
+
} else if (
|
|
28
|
+
c3 === 103 /* 'g' */ &&
|
|
29
|
+
c2 === 114 /* 'r' */ &&
|
|
30
|
+
c1 === 111 /* 'o' */ &&
|
|
31
|
+
c0 === 46 /* '.' */
|
|
32
|
+
) {
|
|
33
|
+
out.isIcann = true;
|
|
34
|
+
out.isPrivate = false;
|
|
35
|
+
out.publicSuffix = 'org';
|
|
36
|
+
return true;
|
|
37
|
+
} else if (
|
|
38
|
+
c3 === 117 /* 'u' */ &&
|
|
39
|
+
c2 === 100 /* 'd' */ &&
|
|
40
|
+
c1 === 101 /* 'e' */ &&
|
|
41
|
+
c0 === 46 /* '.' */
|
|
42
|
+
) {
|
|
43
|
+
out.isIcann = true;
|
|
44
|
+
out.isPrivate = false;
|
|
45
|
+
out.publicSuffix = 'edu';
|
|
46
|
+
return true;
|
|
47
|
+
} else if (
|
|
48
|
+
c3 === 118 /* 'v' */ &&
|
|
49
|
+
c2 === 111 /* 'o' */ &&
|
|
50
|
+
c1 === 103 /* 'g' */ &&
|
|
51
|
+
c0 === 46 /* '.' */
|
|
52
|
+
) {
|
|
53
|
+
out.isIcann = true;
|
|
54
|
+
out.isPrivate = false;
|
|
55
|
+
out.publicSuffix = 'gov';
|
|
56
|
+
return true;
|
|
57
|
+
} else if (
|
|
58
|
+
c3 === 116 /* 't' */ &&
|
|
59
|
+
c2 === 101 /* 'e' */ &&
|
|
60
|
+
c1 === 110 /* 'n' */ &&
|
|
61
|
+
c0 === 46 /* '.' */
|
|
62
|
+
) {
|
|
63
|
+
out.isIcann = true;
|
|
64
|
+
out.isPrivate = false;
|
|
65
|
+
out.publicSuffix = 'net';
|
|
66
|
+
return true;
|
|
67
|
+
} else if (
|
|
68
|
+
c3 === 101 /* 'e' */ &&
|
|
69
|
+
c2 === 100 /* 'd' */ &&
|
|
70
|
+
c1 === 46 /* '.' */
|
|
71
|
+
) {
|
|
72
|
+
out.isIcann = true;
|
|
73
|
+
out.isPrivate = false;
|
|
74
|
+
out.publicSuffix = 'de';
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return false;
|
|
80
|
+
}
|
package/src/options.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export interface IOptions {
|
|
2
|
+
allowIcannDomains: boolean;
|
|
3
|
+
allowPrivateDomains: boolean;
|
|
4
|
+
detectIp: boolean;
|
|
5
|
+
extractHostname: boolean;
|
|
6
|
+
mixedInputs: boolean;
|
|
7
|
+
validHosts: string[] | null;
|
|
8
|
+
validateHostname: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function setDefaultsImpl({
|
|
12
|
+
allowIcannDomains = true,
|
|
13
|
+
allowPrivateDomains = false,
|
|
14
|
+
detectIp = true,
|
|
15
|
+
extractHostname = true,
|
|
16
|
+
mixedInputs = true,
|
|
17
|
+
validHosts = null,
|
|
18
|
+
validateHostname = true,
|
|
19
|
+
}: Partial<IOptions>): IOptions {
|
|
20
|
+
return {
|
|
21
|
+
allowIcannDomains,
|
|
22
|
+
allowPrivateDomains,
|
|
23
|
+
detectIp,
|
|
24
|
+
extractHostname,
|
|
25
|
+
mixedInputs,
|
|
26
|
+
validHosts,
|
|
27
|
+
validateHostname,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const DEFAULT_OPTIONS = /*@__INLINE__*/ setDefaultsImpl({});
|
|
32
|
+
|
|
33
|
+
export function setDefaults(options?: Partial<IOptions>): IOptions {
|
|
34
|
+
if (options === undefined) {
|
|
35
|
+
return DEFAULT_OPTIONS;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return /*@__INLINE__*/ setDefaultsImpl(options);
|
|
39
|
+
}
|
package/src/subdomain.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the subdomain of a hostname string
|
|
3
|
+
*/
|
|
4
|
+
export default function getSubdomain(hostname: string, domain: string): string {
|
|
5
|
+
// If `hostname` and `domain` are the same, then there is no sub-domain
|
|
6
|
+
if (domain.length === hostname.length) {
|
|
7
|
+
return '';
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
return hostname.slice(0, -domain.length - 1);
|
|
11
|
+
}
|