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

react-faux-dom

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-faux-dom - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

4

CHANGES.md

@@ -0,1 +1,5 @@

# 2.0.1
* Fix [#10] (vendor prefixed styles not being camel-cased correctly)
# 2.0.0

@@ -2,0 +6,0 @@

2

package.json
{
"name": "react-faux-dom",
"version": "2.0.0",
"version": "2.0.1",
"description": "DOM like data structure to be mutated by D3 et al, then rendered to React elements",

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

@@ -9,2 +9,12 @@ var React = require('react')

function styleCamelCase (name) {
var camel = camelCase(name)
if (name[0] === '-') {
return camel[0].toUpperCase() + camel.slice(1)
} else {
return camel
}
}
function Element (nodeName, parentNode) {

@@ -19,9 +29,9 @@ this.nodeName = nodeName

setProperty: function (name, value) {
props.style[camelCase(name)] = value
props.style[styleCamelCase(name)] = value
},
getProperty: function (name) {
return props.style[camelCase(name)]
return props.style[styleCamelCase(name)]
},
removeProperty: function (name) {
delete props.style[camelCase(name)]
delete props.style[styleCamelCase(name)]
}

@@ -28,0 +38,0 @@ }

@@ -49,1 +49,8 @@ var test = require('tape')

})
test('vendor prefixed styles are correctly camel-cased', function (t) {
var el = mk().node()
el.setAttribute('style', '-webkit-transition: opacity 100ms ease')
t.plan(1)
t.equal(el.style.WebkitTransition, 'opacity 100ms ease')
})
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