New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

inbound

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inbound - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

lib/matchers/ad/bing.js

24

lib/matchers/email/yahoo.js

@@ -0,16 +1,22 @@

var tldextract = require("tldextract");
module.exports = function (href, referrer, callback) {
if (referrer.host && referrer.host.indexOf('mail.yahoo.net') !== -1) {
return callback(null, {
type: 'email',
client: 'yahoo',
from: referrer.href,
link: href.href
});
} else {
if (referrer.host && referrer.host.indexOf('mail.yahoo') === -1) {
return callback(null, false);
}
tldextract(referrer.href, function(e, tld) {
if (!e && tld.domain === "yahoo" && tld.subdomain.indexOf("mail") !== -1) {
return callback(null, {
type: 'email',
client: 'yahoo',
from: referrer.href,
link: href.href
});
} else {
return callback(null, false);
}
});
};

@@ -6,4 +6,17 @@

*/
module.exports = [
module.exports = [
require('./ad/bing'),
require('./ad/google'),
require('./ad/yahoo'),
require('./local/bing'),
require('./local/foursquare'),
require('./local/groupon'),
require('./local/livingsocial'),
require('./local/mapquest'),
require('./local/opentable'),
require('./local/yahoo'),
require('./local/yellowpages'),
require('./local/yelp'),
require('./social/facebook'),

@@ -10,0 +23,0 @@ require('./social/googlePlus'),

var querystring = require('querystring');
var tldextract = require('tldextract');
module.exports = function (href, referrer, callback) {
if (referrer.host && referrer.host.indexOf('search.yahoo.com') !== -1) {
var description = { type: 'search', engine: 'yahoo' };
var query = querystring.parse(referrer.query).p;
if (query) description.query = query;
return callback(null, description);
} else {
if (referrer.host && referrer.host.indexOf('search.yahoo') === -1) {
return callback(null, false);
}
tldextract(referrer.href, function(e, tld) {
if (!e && tld.domain === "yahoo" && tld.subdomain.indexOf("search") !== -1) {
var description = { type: 'search', engine: 'yahoo' };
var query = querystring.parse(referrer.query).p;
if (query) description.query = query;
return callback(null, description);
} else {
return callback(null, false);
}
});
};
{
"name": "inbound"
, "version": "0.0.3"
, "version": "0.0.4"
, "description": "Url referrer and campaign parsing utilities"
, "author": "Ilya Volodarsky <ilya@segment.io>"
, "author": "Ilya Volodarsky <ilya@segment.io>, Adam Solove <asolove@gmail.com>"
, "engines": { "node": ">= 0.8" }

@@ -15,2 +15,3 @@ , "main": "./index"

, "async": "*"
, "tldextract": "*"
}

@@ -17,0 +18,0 @@ , "devDependencies": {

@@ -122,3 +122,5 @@ # inbound

### Ads
_Gasp!_ None yet. Please [help me add some](#contribute).
* [Bing](https://github.com/segmentio/inbound/tree/master/lib/matchers/ad/bing.js)
* [Google](https://github.com/segmentio/inbound/tree/master/lib/matchers/ad/google.js)
* [Yahoo](https://github.com/segmentio/inbound/tree/master/lib/matchers/ad/yahoo.js)

@@ -162,2 +164,6 @@ ### Internal

### Contributors
+ [@ivolo](https://github.com/ivolo)
+ [@asolove](https://github.com/asolove)
### Matchers

@@ -164,0 +170,0 @@ Matchers help identify and attach more semantic information to referral sources. We'd your help on adding the hundreds of social, search, ad, and other referral sources not matched yet by inbound.

@@ -128,2 +128,13 @@ [

{
"url": null,
"referrer": "http://search.yahoo.co.jp/search?p=hello+how+are+you&search.x=1&fr=top_ga1_sa&tid=top_ga1_sa&ei=UTF-8&aq=&oq=web",
"result": {
"referrer": {
"type": "search",
"engine": "yahoo",
"query": "hello how are you"
}
}
},
{
"url": "http://blog.intercom.io/churn-retention-and-reengaging-customers/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+contrast%2Fblog+%28The+Intercom+Blog%29",

@@ -206,2 +217,14 @@ "referrer": "http://hypem.com/blog/indie+rock+cafe/12289",

{
"url": "https://www.boutine.com/home",
"referrer": "http://36ohk6dgmcd1n-c.c.yom.mail.yahoo.co.jp/om/api/1.0/openmail.app.invoke/36ohk6dgmcd1n/11/1.0.35/us_bizmail/en-US/view.html/0",
"result": {
"referrer": {
"type": "email",
"client": "yahoo",
"from": "http://36ohk6dgmcd1n-c.c.yom.mail.yahoo.co.jp/om/api/1.0/openmail.app.invoke/36ohk6dgmcd1n/11/1.0.35/us_bizmail/en-US/view.html/0",
"link": "https://www.boutine.com/home"
}
}
},
{
"url": "https://www.boutine.com/welcome/stylist",

@@ -406,3 +429,170 @@ "referrer": "http://m.facebook.com/l.php?u=http%3A%2F%2Fwww.boutine.com%2Finvite%2FNYOPURNX&h=8AQEhzMOS",

}
},
{
"url": null,
"referrer": "http://www.bing.com/local/details.aspx?lid=YN165x196022063&q=restaurant&qt=yp&tid=0ef5d82049cf4d7da1e308dbc82bc30e&FORM=LLSV",
"result": {
"referrer": {
"type": "local",
"site": "bing",
"query": "restaurant"
}
}
},
{
"url": null,
"referrer": "http://www.yelp.com/biz_redir?url=http%3A%2F%2Fwww.komirestaurant.com&src_bizid=VYyKYTNHt6cDDcOtuLxiag&cachebuster=1364668787&s=444c7da736ae3c45cf5b6f980f992a6d0be62958582de84fa23bf6429ac32584",
"result": {
"referrer": {
"type": "local",
"site": "yelp"
}
}
},
{
"url": null,
"referrer": "http://local.yahoo.com/info-73358323-kumo-sushi-herndon",
"result": {
"referrer": {
"type": "local",
"site": "yahoo"
}
}
},
{
"url": null,
"referrer": "http://local.search.yahoo.com/search?p=restaurant&addr=Ashburn%2C+VA",
"result": {
"referrer": {
"type": "local",
"site": "yahoo",
"query": "restaurant",
"location": "Ashburn, VA"
}
}
},
{
"url": null,
"referrer": "http://www.yellowpages.com/washington-dc/restaurant?g=washington%2C+dc",
"result": {
"referrer": {
"type": "local",
"site": "yellowpages",
"query": "restaurant",
"location": "washington dc"
}
}
},
{
"url": null,
"referrer": "http://www.yellowpages.com/alexandria-va/mip/jackson-20-21733142?lid=196484815",
"result": {
"referrer": {
"type": "local",
"site": "yellowpages",
"location": "alexandria va"
}
}
},
{
"url": null,
"referrer": "http://www.groupon.com/deals/adventure-park-usa-8",
"result": {
"referrer": {
"type": "local",
"site": "groupon"
}
}
},
{
"url": null,
"referrer": "http://www.livingsocial.com/cities/1-washington-d-c/deals/633380-karaoke-room-rental-plus-10-for-food-and-drink",
"result": {
"referrer": {
"type": "local",
"site": "livingsocial",
"location": "washington d c"
}
}
},
{
"url": null,
"referrer": "http://redirect.foursquare.com/l/?u=http%3A%2F%2F8407kb.com&sig=Soas7kQCgZw%2BHy1hvno0MVH7hd8%3D&s=venue",
"result": {
"referrer": {
"type": "local",
"site": "foursquare"
}
}
},
{
"url": null,
"referrer": "http://www.mapquest.com/places/topaz-hotel-washington-dc-41483193",
"result": {
"referrer": {
"type": "local",
"site": "mapquest"
}
}
},
{
"url": null,
"referrer": "http://www.opentable.com/carmines-restaurant-dc?scpref=115",
"result": {
"referrer": {
"type": "local",
"site": "opentable"
}
}
},
{
"url": "http://www.wix.com/html5webbuilder/400?utm_source=google&utm_medium=cpc&utm_campaign=campaign&experiment_id=website^e^19781277423^1t1",
"referrer": "http://www.google.com/aclk?sa=l&ai=CsDFiIh9XUarABMvj6QHT0YGIBsfH_88Dv_bU_kn5k94GCAAQASgDUJDJ9Pb9_____wFgya6RiYikgBCgAZv_4_ADyAEBqgQoT9BFkNuIRTPl4hEXKRYEjwVv-qNBF2bW-ACWbWogoTsqdyq5AEvnm4AHzYCcDw&sig=AOD64_2m2H4pZxoNx02zUamBzdK_jJjxtg&ved=0CC4Q0Qw&adurl=http://www.wix.com/html5webbuilder/400%3Futm_source%3Dgoogle%26utm_medium%3Dcpc%26utm_campaign%3Dcampaign%26experiment_id%3Dwebsite%5Ee%5E19781277423%5E1t1&rct=j&q=website",
"result": {
"referrer": {
"type": "ad",
"network": "google",
"query": "website"
},
"campaign": {
"source": "google",
"medium": "cpc",
"campaign": "campaign"
}
}
},
{
"url": "https://www.godaddy.com/hosting/website-builder.aspx?isc=wb1db002&utm_source=MSN&utm_medium=cpc&utm_term=create%20your%20own%20website&utm_content=2042012586&utm_campaign=11438627325&ef_id=tedO1uxdk1gAAAzl:20130330174459:s",
"referrer": "http://search.yahoo.com/search;_ylt=AphWIR0PcVHjVBdrcBiSd.SbvZx4?p=website&toggle=1&cop=mss&ei=UTF-8&fr=yfp-t-900",
"result": {
"referrer": {
"type": "ad",
"network": "yahoo",
"query": "website"
},
"campaign": {
"campaign": "11438627325",
"source": "MSN",
"term": "create your own website",
"medium": "cpc"
}
}
},
{
"url": "http://www.godaddy.com/domains/search-dus.aspx?isc=gofab002&utm_source=MSN&utm_medium=cpc&utm_term=buying%20domain%20names&utm_content=1567759293&utm_campaign=11438627038&ef_id=tedO1uxdk1gAAAzl:20130330174553:s",
"referrer": "http://www.bing.com/search?q=website&go=&qs=n&form=QBLH&pq=website&sc=8-4&sp=-1&sk=",
"result": {
"referrer": {
"type": "ad",
"network": "bing",
"query": "website"
},
"campaign": {
"campaign": "11438627038",
"source": "MSN",
"term": "buying domain names",
"medium": "cpc"
}
}
}
]
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