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

yo-yo

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yo-yo - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

4

index.js

@@ -30,6 +30,8 @@ var bel = require('bel') // turns template tag into DOM elements

// copy values for form elements
if ((f.nodeName === 'INPUT' && f.type !== 'file') || f.nodeName === 'TEXTAREA' || f.nodeName === 'SELECT') {
if ((f.nodeName === 'INPUT' && f.type !== 'file') || f.nodeName === 'SELECT') {
if (t.getAttribute('value') === null) t.value = f.value
} else if (f.nodeName === 'TEXTAREA') {
if (t.getAttribute('value') === null) f.value = t.value
}
}
}
{
"name": "yo-yo",
"version": "1.3.0",
"version": "1.3.1",
"description": "A tiny library for building modular UI components using DOM diffing and ES6 tagged template literals",

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

@@ -48,1 +48,11 @@ /*global Event*/

})
test('textarea values get copied', function (t) {
t.plan(1)
function textarea (val) {
return yo`<textarea>${val}</textarea>`
}
var el = textarea('foo')
yo.update(el, textarea('bar'))
t.equal(el.value, 'bar')
})
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