Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

html-to-content-model

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-to-content-model - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

5

lib/Constants.js

@@ -25,3 +25,4 @@ 'use strict';

LINK: 'LINK',
IMAGE: 'IMAGE'
IMAGE: 'IMAGE',
INPUT: 'INPUT'
};

@@ -60,2 +61,2 @@

// These elements are special because they cannot contain childNodes.
var SELF_CLOSING_ELEMENTS = exports.SELF_CLOSING_ELEMENTS = { img: 1 };
var SELF_CLOSING_ELEMENTS = exports.SELF_CLOSING_ELEMENTS = { img: 1, input: 1 };

16

lib/modelFromElement.js

@@ -58,3 +58,8 @@ 'use strict';

a: { href: 'url', rel: 'rel', target: 'target', title: 'title' },
img: { src: 'src', alt: 'alt' }
img: { src: 'src', alt: 'alt' },
input: {
type: 'type',
value: 'value',
placeholder: 'placeholder'
}
};

@@ -87,2 +92,11 @@

}
},
input: function input(tagName, element) {
var data = getEntityData(tagName, element);
return {
key: getKey(),
type: _Constants.ENTITY_TYPE.INPUT,
mutability: 'MUTABLE',
data: data
};
}

@@ -89,0 +103,0 @@ };

{
"name": "html-to-content-model",
"version": "0.2.1",
"version": "0.3.0",
"description": "html-to-content-model",

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

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