No description
Find a file
2023-07-16 12:48:09 +02:00
.vscode initial commit 2023-07-16 11:55:35 +02:00
public initial commit 2023-07-16 11:55:35 +02:00
src fix: resume function not exported properly 2023-07-16 12:48:09 +02:00
.gitignore initial commit 2023-07-16 11:55:35 +02:00
astro.config.mjs initial commit 2023-07-16 11:55:35 +02:00
index.ts chore: finalize package for publishing 2023-07-16 12:10:40 +02:00
package-lock.json 0.0.2 2023-07-16 12:24:40 +02:00
package.json 0.0.2 2023-07-16 12:24:40 +02:00
README.md fix: resume function not exported properly 2023-07-16 12:48:09 +02:00
tsconfig.json initial commit 2023-07-16 11:55:35 +02:00

Astro Resume

Utilities for serializing data from server for use in the client.

  1. Resumable Astro component takes id and data
  2. resume(id: string): Object function for use int he client takes an id string and returns the data as Object

Intallation

npm i @ayco/astro-resume

Usage

---
import Resumable from '@ayco/astro-resume';
const data = {
    hello: 'world'
}
---

<Resumable id="astro-obj" data={data} />

<div id="render-here"></div>

<script>
    import {resume} from '@ayco/astro-resume';
    console.log(resume('astro-obj'));
    const renderDiv = document.querySelector('#render-here');
    if (renderDiv) {
        renderDiv.innerHTML =  JSON.stringify(resume('astro-obj'))
    }
</script>