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.7.0 to 2.8.0

dist/types/tidal.js

6

dist/types/index.js

@@ -43,2 +43,6 @@ 'use strict';

var _tidal = require('./tidal');
var tidal = _interopRequireWildcard(_tidal);
var _custom = require('./custom');

@@ -61,3 +65,3 @@

var types = {
image: image, video: video, youtube: youtube, twitter: twitter, instagram: instagram, facebook: facebook, vine: vine, spotify: spotify, tumblr: tumblr,
image: image, video: video, youtube: youtube, twitter: twitter, instagram: instagram, facebook: facebook, vine: vine, spotify: spotify, tumblr: tumblr, tidal: tidal,
custom: custom /* last element */

@@ -64,0 +68,0 @@ };

3

lib/types/index.js

@@ -10,2 +10,3 @@ import * as image from './image';

import * as tumblr from './tumblr';
import * as tidal from './tidal';
import * as custom from './custom';

@@ -16,3 +17,3 @@ import assert from 'assert';

const types = {
image, video, youtube, twitter, instagram, facebook, vine, spotify, tumblr,
image, video, youtube, twitter, instagram, facebook, vine, spotify, tumblr, tidal,
custom /* last element */

@@ -19,0 +20,0 @@ };

{
"name": "embeds",
"version": "2.7.0",
"version": "2.8.0",
"description": "Parse & render embeds",

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

@@ -13,3 +13,4 @@ const fs = require('fs');

tweetVideo: fs.readFileSync(`${__dirname}/tweet-video.html`, 'utf8').trim(),
tumblrPost: fs.readFileSync(`${__dirname}/tumblr-post.html`, 'utf8').trim()
tumblrPost: fs.readFileSync(`${__dirname}/tumblr-post.html`, 'utf8').trim(),
tidalVideo: fs.readFileSync(`${__dirname}/tidal-video.html`, 'utf8').trim()
};

@@ -551,2 +551,13 @@ import test from './tape-wrapper';

test('parse() tidal video', t => {
const input = fixtures.tidalVideo;
const actual = parse(input);
const expected = {
type: 'tidal',
dataType: 'v',
dataId: '63196259'
};
t.deepEqual(actual, expected);
});
test('parse() custom embed', t => {

@@ -553,0 +564,0 @@ const input = '<iframe src="http://custom.com" width="600" height="600" frameborder="0"></iframe>';

@@ -60,1 +60,9 @@ import test from './tape-wrapper';

});
test('parse() + render() tidal video', t => {
const input = fixtures.tidalVideo;
console.log(input);
const expected = input;
const actual = parseAndRender(input);
t.is(actual, 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