Files: efcf9fd06b02fa9bcd28681b4c777224e19702bb / test / test-79-npm / publicsuffixlist / publicsuffixlist.js
447 bytesRaw
1 | ; |
2 | |
3 | if (process.pkg) { |
4 | let hasBadDeps = true; |
5 | try { |
6 | require('./node_modules/istanbul', 'must-exclude'); |
7 | } catch (_) { |
8 | hasBadDeps = false; |
9 | } |
10 | // istanbul must be in devDeps, not in deps |
11 | if (hasBadDeps) return; |
12 | } |
13 | |
14 | var PublicSuffixList = require('publicsuffixlist'); |
15 | var list = new PublicSuffixList(); |
16 | list.initializeSync(); |
17 | var result = list.lookup('www.domain.com'); |
18 | if (result.tld === 'com') { |
19 | console.log('ok'); |
20 | } |
21 |
Built with git-ssb-web