import {xmlion} from 'xmlion';
const lion = xmlion('div', {class:'cat'}, ['meow']);
lion.value() == '<div class="cat">meow</div>';
lion.addAttribute('data-attribute', 'pride');
lion.value() == '<div class="cat" data-attribute="pride">meow</div>';
lion.removeAttribute('class');
lion.value() == '<div data-attribute="pride">meow</div>';
import helper from 'hyperscript-helpers';
const factory = helper(xmlion);
const {div} = factory;
const lion1 = xmlion('div', {class:'cat','data-attribute':'pride'}, ['meow']);
const lion2 = div({class:'cat','data-attribute':'pride'}, ['meow']);
lion1.value() == lion2.value();
lion.addCub(lion1);
lion.value() == '<div data-attribute="pride">meow<div class="cat" data-attribute="pride">meow</div></div>';
lion.removeCub(lion1);
lion.value() == '<div data-attribute="pride">meow</div>';
lion.addCubs([lion1, lion2]);
lion.value() == '<div data-attribute="pride">meow<div class="cat" data-attribute="pride">meow</div><div class="cat" data-attribute="pride">meow</div></div>';
lion.removeAllCubs();
lion.value() == '<div data-attribute="pride"/>';