Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / 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