Socket
Socket
Sign inDemoInstall

embeds

Package Overview
Dependencies
Maintainers
4
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

embeds - npm Package Compare versions

Comparing version 2.10.1 to 2.11.0

16

dist/parse-input.js

@@ -145,5 +145,5 @@ 'use strict';

};
}], [/https:\/\/embed\.acast\.com\/([\w.-]+)\/([\w.-]+)/, function (match) {
var channel = match[1];
var name = match[2];
}], [/https:\/\/(embed|www)\.acast\.com\/([\w.-]+)\/([\w.-]+)/, function (match) {
var channel = match[2];
var name = match[3];
return {

@@ -153,3 +153,5 @@ type: 'acast',

name: name,
url: 'https://embed.acast.com/' + channel + '/' + name
url: 'https://embed.acast.com/' + channel + '/' + name,
width: 540,
height: 540
};

@@ -163,2 +165,8 @@ }], [/https:\/\/www\.scribd\.com\/embeds\/([0-9]+)\/content/, function (match) {

};
}], [/https:\/\/open.spotify.com\/(.+)/, function (match) {
var uri = match[1].replace(/\//g, ':');
return {
type: 'spotify',
url: 'https://embed.spotify.com/?uri=spotify:' + uri
};
}]];

@@ -130,5 +130,5 @@ const allowed = [

}],
[/https:\/\/embed\.acast\.com\/([\w.-]+)\/([\w.-]+)/, match => {
const channel = match[1];
const name = match[2];
[/https:\/\/(embed|www)\.acast\.com\/([\w.-]+)\/([\w.-]+)/, match => {
const channel = match[2];
const name = match[3];
return {

@@ -138,3 +138,5 @@ type: 'acast',

name,
url: `https://embed.acast.com/${channel}/${name}`
url: `https://embed.acast.com/${channel}/${name}`,
width: 540,
height: 540
};

@@ -149,2 +151,9 @@ }],

};
}],
[/https:\/\/open.spotify.com\/(.+)/, match => {
const uri = match[1].replace(/\//g, ':');
return {
type: 'spotify',
url: `https://embed.spotify.com/?uri=spotify:${uri}`
};
}]

@@ -151,0 +160,0 @@ ];

{
"name": "embeds",
"version": "2.10.1",
"version": "2.11.0",
"description": "Parse & render embeds",

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

@@ -535,3 +535,5 @@ import test from './tape-wrapper';

url: 'https://embed.acast.com/specialrelationship/-1-terrorismandnationalsecurity',
name: '-1-terrorismandnationalsecurity'
name: '-1-terrorismandnationalsecurity',
width: 540,
height: 540
};

@@ -541,2 +543,3 @@

t.deepEqual(parseInput('https://embed.acast.com/specialrelationship/-1-terrorismandnationalsecurity'), expected);
t.deepEqual(parseInput('https://www.acast.com/specialrelationship/-1-terrorismandnationalsecurity'), expected);
});

@@ -561,1 +564,27 @@

});
test('spotify', t => {
t.deepEqual(
parseInput('https://open.spotify.com/artist/6kBDZFXuLrZgHnvmPu9NsG'),
{
type: 'spotify',
url: 'https://embed.spotify.com/?uri=spotify:artist:6kBDZFXuLrZgHnvmPu9NsG'
}
);
t.deepEqual(
parseInput('https://open.spotify.com/track/6sEz1Cd0HVXRXuvIw9zAmK'),
{
type: 'spotify',
url: 'https://embed.spotify.com/?uri=spotify:track:6sEz1Cd0HVXRXuvIw9zAmK'
}
);
t.deepEqual(
parseInput('https://open.spotify.com/user/hamiltonmusical/playlist/4Rf5kHoohcqAS5Qc6gglaX'),
{
type: 'spotify',
url: 'https://embed.spotify.com/?uri=spotify:user:hamiltonmusical:playlist:4Rf5kHoohcqAS5Qc6gglaX'
}
);
});
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