# hyperhtml-wire
**Repository Path**: mirrors_WebReflection/hyperhtml-wire
## Basic Information
- **Project Name**: hyperhtml-wire
- **Description**: The persistent fragment like class used in hyperHTML
- **Primary Language**: Unknown
- **License**: ISC
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-08-19
- **Last Updated**: 2026-01-17
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# hyperhtml-wire
[](https://travis-ci.com/WebReflection/hyperhtml-wire) [](https://coveralls.io/github/WebReflection/hyperhtml-wire?branch=master) [](https://greenkeeper.io/) 
The persistent fragment like class used in [hyperHTML](https://github.com/WebReflection/hyperHTML).
This is particularly useful with [domdiff](https://github.com/WebReflection/domdiff) so it's been extracted from _hyperHTML_ itself..
If you're looking for a smaller, modern, faster, alternative, check [µwire](https://github.com/WebReflection/uwire#readme) out 😉
```js
import Wire from 'hyperhtml-wire';
const wire = new Wire(document.body.querySelectorAll('*'));
wire.firstChild; // first body element
wire.lastChild; // last body element
wire.childNodes; // an array of initial nodes
wire.ownerDocument; // the document of the first child
wire.remove(true); // remove all but first node (domdiff friendly)
wire.remove(false); // remove all nodes
wire.valueOf(true); // force nodes to be re-appended to a fragment
wire.valueOf(false);// returns fragment with nodes only if not appended
```