Skip to content

Allow value-less dash-cased props

Dave Garwacke requested to merge ifyoumakeit/buble:allow-kebab-cased into master

Currently you can't pass down dash-cased properties without a value.

See error case here in REPL.

// current
{ 'data-foo' }

// w/ update
{ 'data-foo': true }

Changes

  • Add true to output if contains dashed and non-value
  • Refactor if/else into named functions
  • data-attribute -> any dash-cased prop
  • Add test

Merge request reports