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.6.0 to 2.7.0

7

dist/parse-input.js

@@ -138,2 +138,9 @@ 'use strict';

};
}], [/https:\/\/www\.scribd\.com\/embeds\/([0-9]+)\/content/, function (match) {
var id = match[1];
return {
type: 'scribd',
id: id,
url: 'https://www.scribd.com/embeds/' + id + '/content'
};
}]];

@@ -121,2 +121,10 @@ const allowed = [

};
}],
[/https:\/\/www\.scribd\.com\/embeds\/([0-9]+)\/content/, match => {
const id = match[1];
return {
type: 'scribd',
id,
url: `https://www.scribd.com/embeds/${id}/content`
};
}]

@@ -123,0 +131,0 @@ ];

9

package.json
{
"name": "embeds",
"version": "2.6.0",
"version": "2.7.0",
"description": "Parse & render embeds",

@@ -9,3 +9,3 @@ "main": "dist/index.js",

"test:node": "nyc babel-tape-runner test/*-test.js",
"test:browser": "browserify -t babelify -t brfs -d test/*-test.js | testron --errors | faucet",
"test:browser": "browserify -t babelify -t brfs -d test/*-test.js | tape-run | faucet",
"test": "npm run test:node && npm run test:browser && npm run lint",

@@ -39,6 +39,5 @@ "build": "rm -rf dist && mkdir -p dist && babel lib --out-dir dist",

"browserify": "^13.0.0",
"electron-prebuilt": "^0.37.7",
"faucet": "0.0.1",
"hyperscript": "^1.4.7",
"nyc": "^6.1.1",
"nyc": "^7.0.0",
"query-dom": "^3.0.7",

@@ -48,3 +47,3 @@ "semistandard-deku": "micnews/semistandard#deku",

"tape-catch": "^1.0.4",
"testron": "^1.2.0",
"tape-run": "^2.1.4",
"tsml": "^1.0.1"

@@ -51,0 +50,0 @@ },

@@ -462,1 +462,19 @@ import test from './tape-wrapper';

});
test('scribd', t => {
const scribdCode = tsml`
<iframe class="scribd_iframe_embed"
src="https://www.scribd.com/embeds/320741042/content?start_page=1&view_mode=scroll&access_key=key-1mpoU4LMiQy0sf1mx8pe&show_recommendations=false"
data-auto-height="false"
data-aspect-ratio="0.7729220222793488"
scrolling="no" id="doc_61832" width="600" height="800" frameborder="0"></iframe>`;
const expected = {
type: 'scribd',
id: '320741042',
url: 'https://www.scribd.com/embeds/320741042/content'
};
t.deepEqual(parseInput(scribdCode), expected);
t.deepEqual(parseInput('https://www.scribd.com/embeds/320741042/content'), expected);
});

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

test('parse() img with width & height css', t => {
const input = tsml`<img src="http://example.com/image.jpg" style="width: 100; height: 200" />`;
const input = tsml`<img src="http://example.com/image.jpg" style="width: 100px; height: 200px" />`;
const actual = parse(input);

@@ -139,3 +139,3 @@ const expected = {

test('parse() video with width & height css', t => {
const input = '<video src="http://example.com/video.mp4" style="width:100;height:200" />';
const input = '<video src="http://example.com/video.mp4" style="width:100px;height:200px" />';
const actual = parse(input);

@@ -142,0 +142,0 @@ const expected = {

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