Comparing version 0.0.3 to 0.0.4
@@ -96,3 +96,3 @@ 'use strict'; | ||
var socialHostsRegex = /(?:facebook\.com|snapchat\.com|instagram\.com|twitter\.com|linkedin\.com|youtube\.com|pinterest\.com|tumblr\.com|plus\.google\.com|medium\.com|github\.com|yelp\.com)$/i; | ||
var socialHostsRegex = /\b(?:facebook\.com|snapchat\.com|instagram\.com|twitter\.com|linkedin\.com|youtube\.com|pinterest\.com|tumblr\.com|plus\.google\.com|medium\.com|github\.com|yelp\.com|m.me|kik.me)$/i; | ||
// TODO yelp with different country top domains. | ||
@@ -112,3 +112,5 @@ | ||
'github.com': 'github', | ||
'yelp.com': 'yelp' | ||
'yelp.com': 'yelp', | ||
'm.me': 'messenger', | ||
'kik.me': 'kik' | ||
}; | ||
@@ -150,2 +152,6 @@ | ||
var messengerUsernameMatcher = /^\/([A-Za-z0-9\.]+)/i; | ||
var kikUsernameMatcher = /^\/([\w\.\-]+)/i; | ||
var matchGroup = function matchGroup(str, matcher) { | ||
@@ -249,2 +255,14 @@ if (str) { | ||
}; | ||
}, | ||
messenger: function messenger(pathname) { | ||
return { | ||
userId: null, | ||
username: matchGroup(pathname, messengerUsernameMatcher) | ||
}; | ||
}, | ||
kik: function kik(pathname) { | ||
return { | ||
userId: null, | ||
username: matchGroup(pathname, kikUsernameMatcher) | ||
}; | ||
} | ||
@@ -251,0 +269,0 @@ }; |
{ | ||
"name": "fetch-meta", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Fetch and extract meta tag information (title, description, og: open graph, twitter, al: app links, social) from url", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
17999
409