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

fetch-meta

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

fetch-meta - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

21

lib/index.js

@@ -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);

2

package.json
{
"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",

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