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

social-links

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

social-links - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

24

lib/main.js

@@ -82,7 +82,7 @@ "use strict";

{
match: '(https?://)?(www.)?linkedin.com/in/({PROFILE_ID})', group: 3, type: exports.TYPE_DESKTOP,
match: '(https?://)?(www.)?linkedin.com/in/({PROFILE_ID})/?', group: 3, type: exports.TYPE_DESKTOP,
pattern: 'https://linkedin.com/in/{PROFILE_ID}'
},
{
match: '(https?://)?(www.)?linkedin.com/mwlite/in/({PROFILE_ID})', group: 3, type: exports.TYPE_MOBILE,
match: '(https?://)?(www.)?linkedin.com/mwlite/in/({PROFILE_ID})/?', group: 3, type: exports.TYPE_MOBILE,
pattern: 'https://linkedin.com/mwlite/in/{PROFILE_ID}'

@@ -96,3 +96,3 @@ },

{
match: '(https?://)?(www.)?twitter.com/({PROFILE_ID})', group: 3, type: exports.TYPE_DESKTOP,
match: '(https?://)?(www.)?twitter.com/({PROFILE_ID})/?', group: 3, type: exports.TYPE_DESKTOP,
pattern: 'https://twitter.com/{PROFILE_ID}'

@@ -106,7 +106,7 @@ },

{
match: '(https?://)?(www.)?facebook.com/({PROFILE_ID})', group: 3, type: exports.TYPE_DESKTOP,
match: '(https?://)?(www.)?facebook.com/({PROFILE_ID})/?', group: 3, type: exports.TYPE_DESKTOP,
pattern: 'https://facebook.com/{PROFILE_ID}'
},
{
match: '(https?://)?m.facebook.com/({PROFILE_ID})', group: 3, type: exports.TYPE_MOBILE,
match: '(https?://)?m.facebook.com/({PROFILE_ID})/?', group: 3, type: exports.TYPE_MOBILE,
pattern: 'https://m.facebook.com/{PROFILE_ID}'

@@ -120,7 +120,7 @@ },

{
match: '(https?://)?(www.)youtube.com/channel/({PROFILE_ID})', group: 3, type: exports.TYPE_DESKTOP,
match: '(https?://)?(www.)youtube.com/channel/({PROFILE_ID})/?', group: 3, type: exports.TYPE_DESKTOP,
pattern: 'https://youtube.com/{PROFILE_ID}'
},
{
match: '(https?://)?m.youtube/c/({PROFILE_ID})', group: 3, type: exports.TYPE_MOBILE,
match: '(https?://)?m.youtube/c/({PROFILE_ID})/?', group: 3, type: exports.TYPE_MOBILE,
pattern: 'https://m.youtube/c/{PROFILE_ID}'

@@ -134,7 +134,7 @@ },

{
match: '(https?://)?(www.)?twitch.tv/({PROFILE_ID})', group: 3, type: exports.TYPE_DESKTOP,
match: '(https?://)?(www.)?twitch.tv/({PROFILE_ID})/?', group: 3, type: exports.TYPE_DESKTOP,
pattern: 'https://twitch.tv/{PROFILE_ID}'
},
{
match: '(https?://)?m.twitch.tv/({PROFILE_ID})', group: 3, type: exports.TYPE_MOBILE,
match: '(https?://)?m.twitch.tv/({PROFILE_ID})/?', group: 3, type: exports.TYPE_MOBILE,
pattern: 'https://m.twitch.tv/{PROFILE_ID}'

@@ -148,3 +148,3 @@ },

{
match: '(https?://)?(www.)?discord.com/channels/({PROFILE_ID})', group: 3, type: exports.TYPE_DESKTOP,
match: '(https?://)?(www.)?discord.com/channels/({PROFILE_ID})/?', group: 3, type: exports.TYPE_DESKTOP,
pattern: 'https://discord.com/channels/{PROFILE_ID}'

@@ -158,3 +158,3 @@ },

{
match: '(https?://)?(www.)?instagram.com/({PROFILE_ID})', group: 3, type: exports.TYPE_DESKTOP,
match: '(https?://)?(www.)?instagram.com/({PROFILE_ID})/?', group: 3, type: exports.TYPE_DESKTOP,
pattern: 'https://instagram.com/{PROFILE_ID}'

@@ -168,3 +168,3 @@ },

{
match: '(https?://)?(www.)?patreon.com/({PROFILE_ID})', group: 3, type: exports.TYPE_DESKTOP,
match: '(https?://)?(www.)?patreon.com/({PROFILE_ID})/?', group: 3, type: exports.TYPE_DESKTOP,
pattern: 'https://patreon.com/{PROFILE_ID}'

@@ -171,0 +171,0 @@ },

@@ -107,4 +107,16 @@ "use strict";

});
it('should sanitize link with slash at end', function () {
var sanitized = sl.sanitize('linkedin', 'linkedin.com/in/gkucmierz/');
expect(sanitized).toBe('https://linkedin.com/in/gkucmierz');
});
it('should sanitize only profile id', function () {
var sanitized = sl.sanitize('linkedin', 'gkucmierz');
expect(sanitized).toBe('https://linkedin.com/in/gkucmierz');
});
it('should sanitize only profile id as mobile', function () {
var sanitized = sl.sanitize('linkedin', 'gkucmierz', main_1.TYPE_MOBILE);
expect(sanitized).toBe('https://linkedin.com/mwlite/in/gkucmierz');
});
});
});
//# sourceMappingURL=main.spec.js.map
{
"name": "social-links",
"version": "1.0.0",
"version": "1.0.1",
"description": "Validate & sanitize social links",

@@ -5,0 +5,0 @@ "main": "lib/main.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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