Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

third-party-web

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

third-party-web - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

dist/entities-httparchive-nostats.json

3

lib/create-entity-finder-api.js

@@ -32,2 +32,5 @@ const DOMAIN_IN_URL_REGEX = /:\/\/(.*?)(\/|$)/

if (!entity.company) entity.company = entity.name
entity.totalExecutionTime = Number(entity.totalExecutionTime) || 0
entity.totalOccurrences = Number(entity.totalOccurrences) || 0
entity.averageExecutionTime = entity.totalExecutionTime / entity.totalOccurrences

@@ -34,0 +37,0 @@ for (const domain of entity.domains) {

@@ -7,2 +7,5 @@ export interface IEntity {

domains: string[]
averageExecutionTime: number
totalExecutionTime: number
totalOccurrences: number
}

@@ -9,0 +12,0 @@

67

lib/index.test.js

@@ -26,19 +26,58 @@ const fs = require('fs')

it('works for direct domain usage', () => {
expect(getEntity('https://js.connect.facebook.net/lib.js')).toEqual({
name: 'Facebook',
company: 'Facebook',
homepage: 'https://www.facebook.com',
categories: ['social'],
domains: expect.any(Array),
})
expect(getEntity('https://js.connect.facebook.net/lib.js')).toMatchInlineSnapshot(`
Object {
"averageExecutionTime": 233.43429691479307,
"categories": Array [
"social",
],
"company": "Facebook",
"domains": Array [
"www.facebook.com",
"connect.facebook.net",
"staticxx.facebook.com",
"static.xx.fbcdn.net",
"m.facebook.com",
"atlassbx.com",
"fbcdn-photos-e-a.akamaihd.net",
"23.62.3.183",
"akamai.net",
"akamaiedge.net",
"akamaitechnologies.com",
"akamaitechnologies.fr",
"akamaized.net",
"edgefcs.net",
"edgekey.net",
"edgesuite.net",
"srip.net",
"cquotient.com",
"demandware.net",
"platform-lookaside.fbsbx.com",
],
"homepage": "https://www.facebook.com",
"name": "Facebook",
"totalExecutionTime": 2249323397,
"totalOccurrences": 9635788,
}
`)
})
it('works for inferred domain usage', () => {
expect(getEntity('https://unknown.typekit.net/fonts.css')).toEqual({
name: 'Adobe TypeKit',
company: 'Adobe',
homepage: 'https://fonts.adobe.com/',
categories: ['library'],
domains: expect.any(Array),
})
expect(getEntity('https://unknown.typekit.net/fonts.css')).toMatchInlineSnapshot(`
Object {
"averageExecutionTime": 233.43429691479307,
"categories": Array [
"library",
],
"company": "Adobe",
"domains": Array [
"use.typekit.net",
"typekit.com",
"p.typekit.net",
],
"homepage": "https://fonts.adobe.com/",
"name": "Adobe TypeKit",
"totalExecutionTime": 2249323397,
"totalOccurrences": 9635788,
}
`)
})

@@ -45,0 +84,0 @@

{
"name": "third-party-web",
"version": "0.5.0",
"version": "0.6.0",
"description": "Categorized data on third party entities on the web.",

@@ -34,2 +34,3 @@ "main": "./lib/index.js",

"exportAliases": {
"httparchive-nostats-subset": "./lib/subsets/httparchive-nostats.js",
"httparchive-subset": "./lib/subsets/httparchive.js"

@@ -36,0 +37,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc