Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/jamen/hyperapp-head
- Owner: jamen
- Created: 2019-04-23T23:08:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-04-27T08:30:30.000Z (over 5 years ago)
- Last Synced: 2024-10-20T02:30:56.442Z (25 days ago)
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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.