third-party-web
Advanced tools
Comparing version 0.11.1 to 0.12.0
@@ -11,3 +11,3 @@ const DOMAIN_IN_URL_REGEX = /:\/\/(\S*?)(:\d+)?(\/|$)/ | ||
if (DOMAIN_CHARACTERS.test(originOrURL)) return originOrURL.match(DOMAIN_CHARACTERS)[0] | ||
throw new Error(`Unable to find domain in "${originOrURL}"`) | ||
return null | ||
} | ||
@@ -14,0 +14,0 @@ |
@@ -47,7 +47,12 @@ const fs = require('fs') | ||
it('throws on invalid inputs', () => { | ||
expect(() => getRootDomain('this is not a domain')).toThrow() | ||
expect(() => getRootDomain('neither-is-this')).toThrow() | ||
expect(() => getRootDomain('http://nor this')).toThrow() | ||
it('runs on data URIs', () => { | ||
const dataUri = 'data:image/gif;base64,R0lGODlhAQABAIAAAP8AADAAACwAAAAAAQABAAACAkQBADs=' | ||
expect(getRootDomain(dataUri)).toEqual(null) | ||
}) | ||
it('returns null on invalid inputs', () => { | ||
expect(getRootDomain('this is not a domain')).toEqual(null) | ||
expect(getRootDomain('neither-is-this')).toEqual(null) | ||
expect(getRootDomain('http://nor this')).toEqual(null) | ||
}) | ||
}) | ||
@@ -59,3 +64,3 @@ | ||
Object { | ||
"averageExecutionTime": 222.95578518974813, | ||
"averageExecutionTime": 228.82690369259257, | ||
"categories": Array [ | ||
@@ -84,4 +89,4 @@ "social", | ||
"name": "Facebook", | ||
"totalExecutionTime": 322128748, | ||
"totalOccurrences": 1444810, | ||
"totalExecutionTime": 334391848, | ||
"totalOccurrences": 1461331, | ||
} | ||
@@ -94,3 +99,3 @@ `) | ||
Object { | ||
"averageExecutionTime": 105.38858905165768, | ||
"averageExecutionTime": 94.28264200503448, | ||
"categories": Array [ | ||
@@ -110,4 +115,4 @@ "cdn", | ||
"name": "Adobe TypeKit", | ||
"totalExecutionTime": 1230201, | ||
"totalOccurrences": 11673, | ||
"totalExecutionTime": 1722921, | ||
"totalOccurrences": 18274, | ||
} | ||
@@ -130,2 +135,7 @@ `) | ||
}) | ||
it('runs on data URIs', () => { | ||
const dataUri = 'data:image/gif;base64,R0lGODlhAQABAIAAAP8AADAAACwAAAAAAQABAAACAkQBADs=' | ||
expect(getEntity(dataUri)).toEqual(undefined) | ||
}) | ||
}) | ||
@@ -132,0 +142,0 @@ |
{ | ||
"name": "third-party-web", | ||
"version": "0.11.1", | ||
"version": "0.12.0", | ||
"description": "Categorized data on third party entities on the web.", | ||
@@ -8,3 +8,3 @@ "main": "./lib/index.js", | ||
"build:www": "cd www/ && npm install && npm run build", | ||
"build": "node bin/build-entity-json-files.js && node bin/generate-sql.js && node bin/generate-canonical-domain-csv.js && generate-export-aliases", | ||
"build": "node bin/convert-json5.js && node bin/generate-canonical-domain-csv.js && node bin/build-entity-json-files.js && node bin/generate-sql.js && generate-export-aliases", | ||
"fix-entities": "prettier --print-width=100 --write data/entities.json", | ||
@@ -11,0 +11,0 @@ "start": "mkdir -p .tmp && node bin/merge-origins-with-entities.js && node bin/create-markdown.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2013220
231
821