Comparing version 0.0.4 to 0.0.5
@@ -96,3 +96,3 @@ 'use strict'; | ||
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; | ||
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|reddit\.com|news\.ycombinator\.com|yelp\.com|m\.me|kik\.me)$/i; | ||
// TODO yelp with different country top domains. | ||
@@ -112,2 +112,4 @@ | ||
'github.com': 'github', | ||
'reddit.com': 'reddit', | ||
'news.ycombinator.com': 'hackernews', | ||
'yelp.com': 'yelp', | ||
@@ -149,2 +151,6 @@ 'm.me': 'messenger', | ||
var redditUsernameMatcher = /^\/(?:u|user)\/([\w\.\-]+)/i; | ||
var hackernewsIdMatcher = /^\bid=([\w\.\-]+)/i; | ||
var yelpBizMatcher = /^\/biz\/([^\?#\/]+)/i; | ||
@@ -248,2 +254,15 @@ var yelpIosUrlBizIdMatcher = /^yelp:\/\/\/biz\/([\w\-]+)/i; | ||
}, | ||
reddit: function reddit(pathname) { | ||
return { | ||
userId: null, | ||
username: matchGroup(pathname, redditUsernameMatcher) | ||
}; | ||
}, | ||
hackernews: function hackernews(pathname, _ref3) { | ||
var query = _ref3.query; | ||
return { | ||
userId: null, | ||
username: matchGroup(query, hackernewsIdMatcher) | ||
}; | ||
}, | ||
yelp: function yelp(pathname, urlParts, res) { | ||
@@ -250,0 +269,0 @@ var username = matchGroup(pathname, yelpBizMatcher); |
{ | ||
"name": "fetch-meta", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"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
18536
426