Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jamen/hyperapp-head

Patch Hyperapp <head> nodes.
https://github.com/jamen/hyperapp-head

Last synced: 17 days ago
JSON representation

Patch Hyperapp <head> nodes.

Awesome Lists containing this project

README

        

# @finepoint/hyperapp-head

Patch Hyperapp `` nodes.

## Install

```
npm i @finepoint/hyperapp-head
```

## Usage

```js
import { patchHead } from '@finepoint/hyperapp-head'

patchHead(

Hello world.

)
```

Here are some notes about the implementation:

- It only patches ``, ``, and `` elements. There may be others (such as ``) but they wont be patched.
- It is not recursive because `` is usually flat. It focuses on matching keys instead, such as ``, ``, ``, and so on.
- There is a `mergeHead(targetHead, head)` function for patching in tools or servers. For example, you have the site's `` and the route page ``, these would need be merged when prerendering.