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.4.0 to 1.4.1

2

index.js

@@ -33,3 +33,3 @@ var bel = require('bel') // turns template tag into DOM elements

if ((f.nodeName === 'INPUT' && f.type !== 'file') || f.nodeName === 'SELECT') {
if (!newValue) {
if (!newValue && !t.hasAttribute('value')) {
t.value = f.value

@@ -36,0 +36,0 @@ } else if (newValue !== oldValue) {

{
"name": "yo-yo",
"version": "1.4.0",
"version": "1.4.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",

@@ -59,2 +59,11 @@ /*global Event*/

test('input value can be update to empty string', function (t) {
t.plan(1)
var el = yo`<input type="text"/>`
el.value = 'hola'
var newEl = yo`<input type="text" value=""/>`
yo.update(el, newEl)
t.equal(el.value, '')
})
test('textarea values get copied', function (t) {

@@ -61,0 +70,0 @@ t.plan(1)

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