Comparing version 2.0.1 to 2.1.0
@@ -118,2 +118,11 @@ 'use strict'; | ||
}; | ||
}], [/https:\/\/embed\.acast\.com\/([\w.-]+)\/([\w.-]+)/, function (match) { | ||
var channel = match[1]; | ||
var name = match[2]; | ||
return { | ||
type: 'acast', | ||
channel: channel, | ||
name: name, | ||
url: 'https://embed.acast.com/' + channel + '/' + name | ||
}; | ||
}]]; |
@@ -99,2 +99,12 @@ const allowed = [ | ||
}; | ||
}], | ||
[/https:\/\/embed\.acast\.com\/([\w.-]+)\/([\w.-]+)/, match => { | ||
const channel = match[1]; | ||
const name = match[2]; | ||
return { | ||
type: 'acast', | ||
channel, | ||
name, | ||
url: `https://embed.acast.com/${channel}/${name}` | ||
}; | ||
}] | ||
@@ -101,0 +111,0 @@ ]; |
{ | ||
"name": "embeds", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "Parse & render embeds", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -404,1 +404,18 @@ import test from './tape-wrapper'; | ||
}); | ||
test('acast', t => { | ||
const acastCode = tsml` | ||
<iframe width="540" height="540" | ||
src="https://embed.acast.com/specialrelationship/-1-terrorismandnationalsecurity" | ||
scrolling="no" frameborder="0" style="border:none;overflow:hidden;"></iframe>`; | ||
const expected = { | ||
type: 'acast', | ||
channel: 'specialrelationship', | ||
url: 'https://embed.acast.com/specialrelationship/-1-terrorismandnationalsecurity', | ||
name: '-1-terrorismandnationalsecurity' | ||
}; | ||
t.deepEqual(parseInput(acastCode), expected); | ||
t.deepEqual(parseInput('https://embed.acast.com/specialrelationship/-1-terrorismandnationalsecurity'), expected); | ||
}); |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
106563
2618
0